X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=ux%2FLightbox.js;h=1091755dfb5fcba916cee82a076bcdeb14737d7a;hb=0b69a11b1055a6d3a3fd0719bdd58b5a235de0e4;hp=8f9744e87eb805f52bec2516a00302ade32d6e23;hpb=86927644b8cb18b14294555d4c9620f08f3ce404;p=roojs1 diff --git a/ux/Lightbox.js b/ux/Lightbox.js index 8f9744e87e..1091755dfb 100644 --- a/ux/Lightbox.js +++ b/ux/Lightbox.js @@ -441,13 +441,13 @@ Roo.apply(Roo.ux.Lightbox.prototype, var imgPreloader = Roo.DomHelper.append(document.body, { tag: 'img' } , true); // once image is preloaded, resize image container - Roo.log(imgPreloader); + imgPreloader.on('load', function() { this.lightboximage.dom.src = this.imageArray[this.activeImage].href || this.imageArray[this.activeImage].dom.href || this.imageArray[this.activeImage].dom.src; - Roo.log(this.lightboximage.dom.src); - this.resizeImageContainer(imgPreloader.getWidth(), imgPreloader.getHeight()); + + this.resizeImageContainer(this.imageArray[this.activeImage].dom.lwidth || imgPreloader.getWidth(), this.imageArray[this.activeImage].dom.lheight || imgPreloader.getHeight()); imgPreloader.remove(); }, this); imgPreloader.dom.src = this.imageArray[this.activeImage].href || @@ -476,6 +476,7 @@ Roo.apply(Roo.ux.Lightbox.prototype, ww -= 150; wh -= 150; + // get new width and height var bs = this.borderSize * 2;