Skip to content

Commit

Permalink
Reverse image rotation direction
Browse files Browse the repository at this point in the history
Modify Javascript code to reverse image rotation direction, per this
discussion on GitHub:

creativeaura/threesixty-slider#70

Hopefully in the future this will be provided by a config option – in
the meantime this means that the project will use a non-standard version
of this JS plugin for now.
  • Loading branch information
egardner committed Oct 8, 2015
1 parent f62297f commit d80ecd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/assets/javascripts/lib/threesixty.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@
if (AppConfig.monitorStartTime < new Date().getTime() - AppConfig.monitorInt) {
AppConfig.pointerDistance = AppConfig.pointerEndPosX - AppConfig.pointerStartPosX;
if(AppConfig.pointerDistance > 0){
AppConfig.endFrame = AppConfig.currentFrame + Math.ceil((AppConfig.totalFrames - 1) * AppConfig.speedMultiplier * (AppConfig.pointerDistance / base.$el.width()));
AppConfig.endFrame = AppConfig.currentFrame - Math.ceil((AppConfig.totalFrames - 1) * AppConfig.speedMultiplier * (AppConfig.pointerDistance / base.$el.width()));
}else{
AppConfig.endFrame = AppConfig.currentFrame + Math.floor((AppConfig.totalFrames - 1) * AppConfig.speedMultiplier * (AppConfig.pointerDistance / base.$el.width()));
AppConfig.endFrame = AppConfig.currentFrame - Math.floor((AppConfig.totalFrames - 1) * AppConfig.speedMultiplier * (AppConfig.pointerDistance / base.$el.width()));
}

if( AppConfig.disableWrap ) {
Expand Down

0 comments on commit d80ecd8

Please sign in to comment.