Author: echatellier Date: 2010-02-02 10:33:50 +0100 (Tue, 02 Feb 2010) New Revision: 2857 Modified: trunk/pollen-ui/src/main/webapp/js/lightbox.js Log: Fix overlay width Modified: trunk/pollen-ui/src/main/webapp/js/lightbox.js =================================================================== --- trunk/pollen-ui/src/main/webapp/js/lightbox.js 2010-02-01 17:46:41 UTC (rev 2856) +++ trunk/pollen-ui/src/main/webapp/js/lightbox.js 2010-02-02 09:33:50 UTC (rev 2857) @@ -221,7 +221,10 @@ // stretch overlay to fill page and fade in var arrayPageSize = this.getPageSize(); - $('overlay').setStyle({height: arrayPageSize[1] + 'px' }); + + // EC-20100202 : fix width size + //$('overlay').setStyle({height: arrayPageSize[1] + 'px' }); + $('overlay').setStyle({height: arrayPageSize[0] + 'px', width: arrayPageSize[0] + 'px'}); new Effect.Appear(this.overlay, { duration: this.overlayDuration, from: 0.0, to: LightboxOptions.overlayOpacity }); @@ -311,7 +314,9 @@ IsResized = false; } } - this.overlay.setStyle({ height: arrayPageSize[1] + 'px' }); + // EC-20100202 : fix width size + //this.overlay.setStyle({height: arrayPageSize[1] + 'px' }); + this.overlay.setStyle({width: arrayPageSize[0] + 'px', height: arrayPageSize[1] + 'px'}); this.lightboxImage.setStyle({ height: imgHeight + 'px', width: imgWidth + 'px'}); if (recall == true) { @@ -541,11 +546,11 @@ // for small pages with total width less then width of the viewport if(xScroll < windowWidth){ - pageWidth = xScroll; + pageWidth = windowWidth; } else { - pageWidth = windowWidth; + pageWidth = xScroll; } - + return [pageWidth,pageHeight,windowWidth,windowHeight]; } }