From 98699fbbc077027c83c05560f9d7df29c7fc76e0 Mon Sep 17 00:00:00 2001 From: William Monti Souza Date: Sun, 17 Mar 2019 17:00:51 -0400 Subject: Fixes popups not showing when screen size is odd (#6312) --- app/scripts/lib/notification-manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/scripts/lib/notification-manager.js') diff --git a/app/scripts/lib/notification-manager.js b/app/scripts/lib/notification-manager.js index 758979973..721d109a1 100644 --- a/app/scripts/lib/notification-manager.js +++ b/app/scripts/lib/notification-manager.js @@ -26,8 +26,8 @@ class NotificationManager { extension.windows.update(popup.id, { focused: true }) } else { const {screenX, screenY, outerWidth, outerHeight} = window - const notificationTop = screenY + (outerHeight / 2) - (NOTIFICATION_HEIGHT / 2) - const notificationLeft = screenX + (outerWidth / 2) - (NOTIFICATION_WIDTH / 2) + const notificationTop = Math.round(screenY + (outerHeight / 2) - (NOTIFICATION_HEIGHT / 2)) + const notificationLeft = Math.round(screenX + (outerWidth / 2) - (NOTIFICATION_WIDTH / 2)) const cb = (currentPopup) => { this._popupId = currentPopup.id } // create new notification popup const creation = extension.windows.create({ -- cgit