]> www.average.org Git - mkgallery.git/blobdiff - include/showwin.js
take care of showing the "loading" animation, at the right place
[mkgallery.git] / include / showwin.js
index 96568269b88b35f44adffbc9ba751442c16b8cf0..d0451601407adc46f8ab04bd07b3055972d8f8e1 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 /*
-       Hidable "fullscreen" Window for Slideshow
+       Hideable "fullscreen" Window for Slideshow
 */
 
 var showWindow = new Class({
@@ -45,8 +45,6 @@ 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));
        },
@@ -93,6 +91,7 @@ var showWindow = new Class({
                        'overflow-x': 'hidden',
                        'overflow-y': 'hidden',
                });
+               this.position();
                this.container.setStyle('display', 'block');
        },
 
@@ -102,7 +101,11 @@ var showWindow = new Class({
                }
                document.body.setStyles(this.bodystyles);
                this.container.setStyle('display', 'none');
-       }
+       },
+
+       grab: function(obj){
+               return this.container.grab(obj);
+       },
 })
 showWindow.implement(new Options);