X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=include%2Fshowwin.js;h=96568269b88b35f44adffbc9ba751442c16b8cf0;hp=c900ab4decbd10e92094e6e57f4f7aee04561e3f;hb=84036a64eb5be457cfa21450ddc7da596eec8bbc;hpb=bf4ffba811821b98c05460149d8bf2d8cc807a29 diff --git a/include/showwin.js b/include/showwin.js index c900ab4..9656826 100644 --- a/include/showwin.js +++ b/include/showwin.js @@ -53,10 +53,12 @@ var showWindow = new Class({ 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; } @@ -66,6 +68,14 @@ var showWindow = new Class({ }) }, + getCoordinates: function(){ + return { + width: this.w, + height: this.h, + top: this.s, + }; + }, + show: function(){ if (this.options.tohide) { this.hiddenstyles = this.options.tohide.getStyles(