summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoseph.olstad2016-06-14 01:49:35 (GMT)
committerjoseph.olstad2016-06-14 01:49:35 (GMT)
commit8cf7fa11a8c2e158774f46465e3817998b1cfd3b (patch)
treee7c6a2783bcca3932931a6d6598f7d0bed3745a4
parent8f8add82e19175abdbaff9f22577dcbc7daa1ab1 (diff)
revert commit a2de8e8a273b #1377936 , its not ready7.x-2.3
-rw-r--r--js/lightbox.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/lightbox.js b/js/lightbox.js
index 2757aa0..061cfd6 100644
--- a/js/lightbox.js
+++ b/js/lightbox.js
@@ -285,7 +285,7 @@ Lightbox = {
$("#lightbox2-overlay").hide().css({
'width': '100%',
'zIndex': '10090',
- 'height': '100%',
+ 'height': arrayPageSize[1] + 'px',
'backgroundColor' : '#' + Lightbox.overlayColor
});
// Detect OS X FF2 opacity + flash issue.
@@ -693,6 +693,16 @@ Lightbox = {
}
}
+ // Adjust the page overlay size.
+ var arrayPageSize = Lightbox.getPageSize();
+ var arrayPageScroll = Lightbox.getPageScroll();
+ var pageHeight = arrayPageSize[1];
+ if (Lightbox.isZoomedIn && arrayPageSize[1] > arrayPageSize[3]) {
+ var lightboxTop = (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1;
+ pageHeight = pageHeight + arrayPageScroll[1] + lightboxTop;
+ }
+ $('#lightbox2-overlay').css({'height': pageHeight + 'px', 'width': arrayPageSize[0] + 'px'});
+
// Gecko browsers (e.g. Firefox, SeaMonkey, etc) don't handle pdfs as
// expected.
if (Drupal.settings.lightbox2.useragent.search('Mozilla') !== -1) {