*/
/*
- Hidable "fullscreen" Window for Slideshow
+ Hideable "fullscreen" Window for Slideshow
*/
var showWindow = new Class({
this.options.onClick()
}.bind(this)).injectInside(this.options.container);
- this.position();
-
window.addEvent('resize', this.position.bind(this));
window.addEvent('scroll', this.position.bind(this));
},
position: function(){
if(this.options.container == document.body){
+ this.w = window.getWidth();
this.h = window.getHeight();
this.s = window.getScrollTop();
}else{
var myCoords = this.options.container.getCoordinates();
+ this.w = myCoords.width;
this.h = myCoords.height;
this.s = myCoords.top;
}
})
},
+ getCoordinates: function(){
+ return {
+ width: this.w,
+ height: this.h,
+ top: this.s,
+ };
+ },
+
show: function(){
if (this.options.tohide) {
this.hiddenstyles = this.options.tohide.getStyles(
'overflow-x': 'hidden',
'overflow-y': 'hidden',
});
+ this.position();
this.container.setStyle('display', 'block');
},