From d80ecd86f5b5054cb47a3e24e9518c792975fe75 Mon Sep 17 00:00:00 2001 From: Eric Gardner Date: Thu, 8 Oct 2015 08:40:12 -0700 Subject: [PATCH] Reverse image rotation direction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modify Javascript code to reverse image rotation direction, per this discussion on GitHub: https://github.com/creativeaura/threesixty-slider/issues/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. --- source/assets/javascripts/lib/threesixty.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/assets/javascripts/lib/threesixty.js b/source/assets/javascripts/lib/threesixty.js index c8141c5f..10951324 100755 --- a/source/assets/javascripts/lib/threesixty.js +++ b/source/assets/javascripts/lib/threesixty.js @@ -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 ) {