dont indent first center/target overlays

This commit is contained in:
Mads Rasmussen
2018-04-05 14:39:04 +02:00
parent a2356ea651
commit 63315f6162

View File

@@ -438,7 +438,7 @@ Opens an overlay to show a custom YSOD. </br>
// this has to be done inside a timeout to ensure the destroy
// event on other overlays is run before registering a new one
registerOverlay();
setOverlayIndent();
});
@@ -556,8 +556,8 @@ Opens an overlay to show a custom YSOD. </br>
var overlayWidth = el.context.clientWidth;
el.css('width', overlayWidth - indentSize);
if(scope.position === "center" || scope.position === "target") {
if(scope.position === "center" && overlayIndex > 0 || scope.position === "target" && overlayIndex > 0) {
var overlayTopPosition = el.context.offsetTop;
el.css('top', overlayTopPosition + indentSize);
}