Skip to content

Commit

Permalink
Breaking: Remove backgroundactive option
Browse files Browse the repository at this point in the history
Use `background:transparent` or `background:transparent, absolute:true` instead.
  • Loading branch information
vladimirsiljkovic committed Dec 10, 2018
1 parent 9c7097b commit 53ba291
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions jquery.popupoverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
var $body = $('body');
var $wrapper;
var options = $el.data('popupoptions');
var css;

bodymarginright = parseInt($body.css('margin-right'), 10);
transitionsupport = document.body.style.webkitTransition !== undefined ||
Expand All @@ -61,12 +60,6 @@
options.scrolllock = false;
}

if (options.backgroundactive) {
options.background = false;
options.blur = false;
options.scrolllock = false;
}

if (options.scrolllock) {
// Calculate the browser's scrollbar width dynamically
var parent;
Expand Down Expand Up @@ -163,22 +156,14 @@
verticalAlign: 'middle'
});

css = {
$wrapper.css({
position: 'fixed',
width: '100%',
height: '100%',
top: 0,
left: 0,
textAlign: 'center'
};

if(options.backgroundactive){
css.position = 'absolute';
css.height = '0';
css.overflow = 'visible';
}

$wrapper.css(css);
});

// CSS vertical align helper
$wrapper.append('<div class="popup_align" />');
Expand Down Expand Up @@ -357,19 +342,6 @@
}
}

if(options.backgroundactive){
//calculates the vertical align
$el.css({
top:(
$window.height() - (
$el.get(0).offsetHeight +
parseInt($el.css('margin-top'), 10) +
parseInt($el.css('margin-bottom'), 10)
)
)/2 +'px'
});
}

$el.css({
'visibility': 'visible',
'opacity': 1
Expand Down Expand Up @@ -863,7 +835,6 @@
absolute: false,
autoopen: false,
background: true,
backgroundactive: false,
color: 'black',
opacity: '0.5',
horizontal: 'center',
Expand Down

0 comments on commit 53ba291

Please sign in to comment.