소스 검색

Reset current slide to 0 if slide doesn't exist

Jay Salvat 10 년 전
부모
커밋
c51986b3eb
4개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 1
      dist/vegas.js
  2. 1 1
      dist/vegas.min.js
  3. 0 0
      dist/vegas.min.js.map
  4. 4 0
      src/vegas.js

+ 5 - 1
dist/vegas.js

@@ -1,6 +1,6 @@
 /*!-----------------------------------------------------------------------------
  * Vegas - Fullscreen Backgrounds and Slideshows.
- * v2.0.0-wip - built 2015-01-16
+ * v2.0.0-wip - built 2015-01-18
  * Licensed under the MIT License.
  * http://vegas.jaysalvat.com/
  * ----------------------------------------------------------------------------
@@ -212,6 +212,10 @@
         },
 
         _goto: function (nb) {
+            if (typeof this.settings.slides[nb] === 'undefined') {
+                nb = 0;
+            }
+
             this.slide = nb;
 
             var $slide,

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/vegas.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/vegas.min.js.map


+ 4 - 0
src/vegas.js

@@ -203,6 +203,10 @@
         },
 
         _goto: function (nb) {
+            if (typeof this.settings.slides[nb] === 'undefined') {
+                nb = 0;
+            }
+
             this.slide = nb;
 
             var $slide,

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.