Skip to content

Commit

Permalink
feat(StreetViewPanorama): remove log, cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hermann committed Jun 1, 2017
1 parent ab513a5 commit 4127f7e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/lib/utils/OverlayViewHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,22 @@ function ensureOfType(inst, type, factory) {
function getLayoutStylesByBounds(mapCanvasProjection, offset, bounds) {
const ne = mapCanvasProjection.fromLatLngToDivPixel(bounds.getNorthEast());
const sw = mapCanvasProjection.fromLatLngToDivPixel(bounds.getSouthWest());
return ne && sw ? {
left: `${sw.x + offset.x}px`,
top: `${ne.y + offset.y}px`,
width: `${ne.x - sw.x - offset.x}px`,
height: `${sw.y - ne.y - offset.y}px`,
} : {
if (ne && sw) {
return {
left: `${sw.x + offset.x}px`,
top: `${ne.y + offset.y}px`,
width: `${ne.x - sw.x - offset.x}px`,
height: `${sw.y - ne.y - offset.y}px`,
};
}
return {
left: `-9999px`,
top: `-9999px`,
};
}

function getLayoutStylesByPosition(mapCanvasProjection, offset, position) {
const point = mapCanvasProjection.fromLatLngToDivPixel(position);
console.log(point);
if (point) {
const { x, y } = point;
return {
Expand Down

0 comments on commit 4127f7e

Please sign in to comment.