From ea620e12f0a5f4249329c7632cbdcae4de945158 Mon Sep 17 00:00:00 2001 From: Thomas Marstrander Date: Thu, 7 Apr 2016 15:22:19 +0200 Subject: [PATCH] Reverted left adjustment of confirmation dialog. HFJ-1572 --- js/h5p-confirmation-dialog.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/js/h5p-confirmation-dialog.js b/js/h5p-confirmation-dialog.js index 74b701d..b631c0c 100644 --- a/js/h5p-confirmation-dialog.js +++ b/js/h5p-confirmation-dialog.js @@ -163,34 +163,15 @@ H5P.ConfirmationDialog = (function (EventDispatcher) { popupOffsetTop = exitButtonOffset; } popup.style.top = popupOffsetTop + 'px'; - - // Overflows width - var popupOffsetLeft = parseInt(popup.style.left, 10); - - if (popupOffsetLeft + popup.offsetWidth + exitButtonOffset + shadowOffset > wrapperElement.offsetWidth) { - popupOffsetLeft = wrapperElement.offsetWidth - exitButtonOffset - shadowOffset - popup.offsetWidth; - } - - if (popupOffsetLeft < 0) { - popupOffsetLeft = 0; - } - - popup.style.left = popupOffsetLeft + 'px'; }; /** * Show confirmation dialog * @params {number} offsetTop Offset top - * @params {number} [offsetLeft] Offset left * @returns {H5P.ConfirmationDialog} */ - this.show = function (offsetTop, offsetLeft) { - popup.classList.remove('not-centered'); + this.show = function (offsetTop) { popup.style.top = offsetTop + 'px'; - if (offsetLeft !== undefined) { - popup.classList.add('not-centered'); - popup.style.left = offsetLeft + 'px'; - } popupBackground.classList.remove('hidden'); fitToContainer(); popupBackground.classList.remove('hiding');