]> www.average.org Git - mkgallery.git/blobdiff - include/slideshow.js
more correct sizing; simplify doc structure
[mkgallery.git] / include / slideshow.js
index 0b19b6bd4b3df1a4560fe7ae049f859aeedb8dbf..2de9fee5b7b8b8770bfd6d2c606567ddadf47e5d 100644 (file)
@@ -33,7 +33,7 @@ var slideShow = new Class({
                \r
                this.container = $(container);\r
                this.container.setStyles({\r
-                       position: 'relative',\r
+                       /* position: 'relative', */\r
                        overflow: 'hidden'\r
                });\r
                if(this.options.onClick){\r
@@ -173,8 +173,10 @@ var slideShow = new Class({
                if (vfactor < factor) { factor = vfactor; }\r
                if (hfactor < factor) { factor = hfactor; }\r
                factor *= .95;\r
-               height = Math.round(height * factor);\r
-               width = Math.round(width * factor);\r
+               if (factor < 1) {\r
+                       height = Math.round(height * factor);\r
+                       width = Math.round(width * factor);\r
+               }\r
                var topoff = (this.height - height)/2;\r
                var leftoff = (this.width - width)/2;\r
                /* alert('dim: '+width+'x'+height+'+'+leftoff+'+'+topoff); */\r