Skip to content

Commit

Permalink
Merge pull request #3 from Atu/rotation-direction
Browse files Browse the repository at this point in the history
[#1] Add direction option for autoplay feature.
  • Loading branch information
creativeaura committed Feb 13, 2013
2 parents b396633 + 0d0c4f8 commit 64128f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
threesixty.sublime*
.DS_Store
13 changes: 11 additions & 2 deletions src/threesixty.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,11 @@
*
*/
base.moveToNextFrame = function () {
AppCongif.endFrame -= 1;
if (AppCongif.autoplayDirection === 1) {
AppCongif.endFrame -= 1;
} else {
AppCongif.endFrame += 1;
}
base.refresh();
};

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 64128f5

Please sign in to comment.