Skip to content

Commit

Permalink
Fixes popups not showing when screen size is odd (#6312)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmsouza authored and whymarrh committed Mar 17, 2019
1 parent ea34d3b commit 98699fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/scripts/lib/notification-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 98699fb

Please sign in to comment.