this.resizeSpeed = Math.min(this.resizeSpeed, 10);
this.resizeSpeed = Math.max(this.resizeSpeed, 1);
this.resizeSpeed = Math.min(this.resizeSpeed, 10);
this.resizeSpeed = Math.max(this.resizeSpeed, 1);
- this.resizeDuration = this.animate ? ((11 - this.resizeSpeed) * 0.15) : 0;
- this.overlayDuration = this.animate ? 0.2 : 0; // shadow fade in/out duration
+ this.resizeDuration = this.animate ? ((11 - this.resizeSpeed) * 0.15) : 0;
+ this.overlayDuration = this.animate ? 0.2 : 0; // shadow fade in/out duration
// When Lightbox starts it will resize itself from 250 by 250 to the current image dimension.
// If animations are turned off, it will be hidden as to prevent a flicker of a
// When Lightbox starts it will resize itself from 250 by 250 to the current image dimension.
// If animations are turned off, it will be hidden as to prevent a flicker of a
- var lightboxTop = s.top + (Roo.lib.Dom.getViewHeight() / 10);
- var lightboxLeft = s.left
+
+ //var lightboxTop = s.top + (Roo.lib.Dom.getViewHeight() / 10);
+ var lightboxTop = (Roo.lib.Dom.getViewHeight() / 10) + document.body.scrollTop;
+ var lightboxLeft = s.left;
- 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.dom.src = this.imageArray[this.activeImage].dom.href;
+ Roo.log(this.imageArray[this.activeImage]);
+ imgPreloader.dom.src = this.imageArray[this.activeImage].srcfull || this.imageArray[this.activeImage].href ||
+ this.imageArray[this.activeImage].dom.href || this.imageArray[this.activeImage].dom.src;
// if image is part of set display 'Image x of x'
if (this.imageArray.length > 1){
this.numberdisplay.update(
// if image is part of set display 'Image x of x'
if (this.imageArray.length > 1){
this.numberdisplay.update(
if (this.imageArray.length > this.activeImage + 1){
preloadNextImage = Roo.DomHelper.append(document.body, { tag: 'img' } , true);
preloadNextImage.on('load', function() { preloadNextImage.remove() });
if (this.imageArray.length > this.activeImage + 1){
preloadNextImage = Roo.DomHelper.append(document.body, { tag: 'img' } , true);
preloadNextImage.on('load', function() { preloadNextImage.remove() });
}
if (this.activeImage > 0){
preloadPrevImage = Roo.DomHelper.append(document.body, { tag: 'img' } , true);
preloadPrevImage.on('load', function() { preloadPrevImage.remove() });
}
if (this.activeImage > 0){
preloadPrevImage = Roo.DomHelper.append(document.body, { tag: 'img' } , true);
preloadPrevImage.on('load', function() { preloadPrevImage.remove() });