position: 'absolute',
top: '0px',
width: '100%',
- 'z-index': '999'
+ 'z-index': '40999'
}
});
},
// stretch overlay to fill page and fade in
//var arrayPageSize = this.getPageSize();
- this.overlay.setHeight(Roo.lib.Dom.getDocumentHeight()) ;
- this.overlay.setWidth(Roo.lib.Dom.getDocumentWidth());
+ this.onResize();
+ if (!this.resizer) {
+ this.resizer = Roo.EventManager.onWindowResize(this.onResize, this, true);;
+ }
+
+
this.overlay.fadeIn({
endOpacity: this.overlayOpacity,
easing: 'easeOut',
});
//this.imageArray = [];
- var imageNum = 0;
+ var imageNum = -1;
if (imageLink) {
imageLink = Roo.get(imageLink);
imageNum = i;
}
});
+ if (imageNum < 0) {
+
+ this.imageArray.push(imageLink);
+ imageNum = this.imageArray.length-1;
+ }
}
-
+
// let's assume the constructor sorts out the list of images..
/*
if ((imageLink.rel == 'lightbox')){
// weird.. why / 10?
//var lightboxTop = s.top + (Roo.lib.Dom.getViewHeight() / 10);
- var lightboxTop = (Roo.lib.Dom.getViewHeight() / 10);
+ var lightboxTop = (Roo.lib.Dom.getViewHeight() / 10) + document.body.scrollTop;
var lightboxLeft = s.left;
this.lightbox.setStyle({
top: lightboxTop + 'px',
left: lightboxLeft + 'px' ,
- zIndex : 1000
+ zIndex : 41000
});
//console.log("show lightbox");
this.lightbox.show();
this.changeImage(imageNum);
},
+ onResize : function()
+ {
+ this.overlay.setHeight(Roo.lib.Dom.getDocumentHeight()) ;
+ this.overlay.setWidth(Roo.lib.Dom.getDocumentWidth());
+ },
//
// changeImage()
// Hide most elements and preload image in preparation for resizing image container.
// hide elements during transition
if (this.animate) {
this.loading.setStyle({
- zIndex :1200
+ zIndex : 41200
});
this.loading.show();
this.loadinglink.setX( (Roo.lib.Dom.getViewWidth() / 2) - 16);