nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 39479bdc781445dcb6152928d32a2af1ca32e9aa
parent bc6da9b9542ac4b3354716d3927d5a05f8f3df03
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Tue, 22 Nov 2016 11:49:58 +0300

[window popup] little cleanup

Diffstat:
Msrc/lib/popupWindow/popupWindow.js | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/popupWindow/popupWindow.js b/src/lib/popupWindow/popupWindow.js @@ -1,12 +1,11 @@ function openPopup (url, width) { var left, top, height, screenLeft = screen.availLeft || 0, - screenTop = screen.availTop || 0, bordersWidth = 8; // if browser window is in the right half of screen, place new window on left half if (window.screenX - screenLeft - bordersWidth * 1.5 > width) { left = window.screenX - width - bordersWidth * 1.5; - // if browser window is in the left half of screen, place new window on right half + // if browser window is in the left half of screen, place new window on right half } else if (window.screenX + window.outerWidth + width + bordersWidth * 1.5 < screenLeft + screen.availWidth) { left = window.screenX + window.outerWidth + bordersWidth; // if screen is small or browser window occupies whole screen, place new window on top of current window