Permalink
Browse files

Add direction option for autoplay feature.

  • Loading branch information...
1 parent b396633 commit 0d0c4f88902e64d5bfbf71c11b07384d739db796 @atu atu committed Feb 13, 2013
Showing with 12 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +11 −2 src/threesixty.js
View
@@ -1 +1,2 @@
threesixty.sublime*
+.DS_Store
View
@@ -311,7 +311,11 @@
*
*/
base.moveToNextFrame = function () {
- AppCongif.endFrame -= 1;
+ if (AppCongif.autoplayDirection === 1) {
+ AppCongif.endFrame -= 1;
+ } else {
+ AppCongif.endFrame += 1;
+ }
base.refresh();
};
@@ -595,7 +599,12 @@
* @cfg {Boolean} autoplay[false]
* Autoplay the 360 animation
*/
- autoplay: false
+ autoplay: false,
+ /**
+ * @cfg {number} autoplayDirection [1]
+ * Direction for autoplay the 360 animation. 1 for right spin, and -1 for left spin.
+ */
+ autoplayDirection: 1
};
$.fn.ThreeSixty = function (options) {

0 comments on commit 0d0c4f8

Please sign in to comment.