瀏覽代碼

Build 1.3.3

Jay Salvat 11 年之前
父節點
當前提交
be3906f421
共有 5 個文件被更改,包括 18 次插入7 次删除
  1. 1 1
      component.json
  2. 13 2
      dist/jquery.vegas.js
  3. 1 1
      dist/jquery.vegas.min.js
  4. 2 2
      dist/metadata.json
  5. 1 1
      package.json

+ 1 - 1
component.json

@@ -1,6 +1,6 @@
 {
   "name": "Vegas",
-  "version": "1.3.2",
+  "version": "1.3.3",
   "description": "Vegas – Fullscreen Backgrounds and Slideshows with jQuery.",
   "homepage": "http://vegas.jaysalvat.com",
   "author": "Jay Salvat",

+ 13 - 2
dist/jquery.vegas.js

@@ -1,6 +1,6 @@
  // ----------------------------------------------------------------------------
  // Vegas – Fullscreen Backgrounds and Slideshows with jQuery.
- // v1.3.2 - released 2013-08-29 13:29
+ // v1.3.3 - released 2013-09-03 13:27
  // Licensed under the MIT license.
  // http://vegas.jaysalvat.com/
  // ----------------------------------------------------------------------------
@@ -237,7 +237,7 @@
             });
             return;
         }
-        var ww = $(window).width(), wh = $(window).height(), iw = $img.width(), ih = $img.height(), rw = wh / ww, ri = ih / iw, newWidth, newHeight, newLeft, newTop, properties;
+        var vp = getViewportSize(), ww = vp.width, wh = vp.height, iw = $img.width(), ih = $img.height(), rw = wh / ww, ri = ih / iw, newWidth, newHeight, newLeft, newTop, properties;
         if (rw > ri) {
             newWidth = wh / ri;
             newHeight = wh;
@@ -286,6 +286,17 @@
             return $("body").css("backgroundImage").replace(/url\("?(.*?)"?\)/i, "$1");
         }
     }
+    function getViewportSize() {
+        var elmt = window, prop = "inner";
+        if (!("innerWidth" in window)) {
+            elmt = document.documentElement || document.body;
+            prop = "client";
+        }
+        return {
+            width: elmt[prop + "Width"],
+            height: elmt[prop + "Height"]
+        };
+    }
     $.vegas = function(method) {
         if (methods[method]) {
             return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));

文件差異過大導致無法顯示
+ 1 - 1
dist/jquery.vegas.min.js


+ 2 - 2
dist/metadata.json

@@ -1,4 +1,4 @@
 {
-  "date": "2013-08-15 17:14:54",
-  "version": "1.3.2"
+  "date": "2013-09-03 13:27:49",
+  "version": "1.3.3"
 }

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "Vegas",
-  "version": "1.3.2",
+  "version": "1.3.3",
   "description": "Vegas – Fullscreen Backgrounds and Slideshows with jQuery.",
   "homepage": "http://vegas.jaysalvat.com",
   "author": "Jay Salvat",

部分文件因文件數量過多而無法顯示