summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStella Power2007-09-27 10:28:45 (GMT)
committerStella Power2007-09-27 10:28:45 (GMT)
commit7e29d7cb74cfbf060cd3c16c17678cdbc4431bdb (patch)
treee313ecae9b0727e4d6877f1be32ad329a9789429
parentf6fda11bf30b352b951dc92601df0c8bed565d9c (diff)
fixed problem with zoomed images when scrolling5.x-2.0
-rw-r--r--js/lightbox.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/lightbox.js b/js/lightbox.js
index 7bc53e4..6437853 100644
--- a/js/lightbox.js
+++ b/js/lightbox.js
@@ -55,7 +55,6 @@ var Lightbox = {
imageArray : new Array,
activeImage : null,
inprogress : false,
- lightboxTop : null,
@@ -290,10 +289,10 @@ var Lightbox = {
// calculate top and left offset for the lightbox
var arrayPageScroll = Lightbox.getPageScroll();
- Lightbox.lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10);
+ var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10);
var lightboxLeft = arrayPageScroll[0];
$('#lightbox').css({
- top: Lightbox.lightboxTop + 'px',
+ top: lightboxTop + 'px',
left: lightboxLeft + 'px'
}).show();
@@ -343,7 +342,7 @@ var Lightbox = {
// resize code
var arrayPageSize = Lightbox.getPageSize();
- var targ = { w:arrayPageSize[2] - (Lightbox.borderSize * 2), h:arrayPageSize[3] - (Lightbox.borderSize * 6) - Lightbox.lightboxTop };
+ var targ = { w:arrayPageSize[2] - (Lightbox.borderSize * 2), h:arrayPageSize[3] - (Lightbox.borderSize * 6) - (arrayPageSize[3] / 10) };
var orig = { w:imgPreloader.width, h:imgPreloader.height };
var ratio = 1.0; // shrink image with the same aspect
$('#bottomNavZoom').hide();