From 5f426dac27b35364d02c1ef925b00c596960d517 Mon Sep 17 00:00:00 2001 From: Sean Clark Date: Tue, 29 Apr 2014 18:20:32 -0400 Subject: [PATCH] Update sliders.js Fixed coding style errors --- js/sliders.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/sliders.js b/js/sliders.js index bfd2a61..5e183c1 100644 --- a/js/sliders.js +++ b/js/sliders.js @@ -83,9 +83,9 @@ if (e.touches.length > 1 || !slider) { return; // Exit if a pinch || no slider } - + // adjust the starting position if we just started to avoid jumpage - if(!startedMoving) { + if (!startedMoving) { pageX += (e.touches[0].pageX - pageX) - 1; } @@ -96,7 +96,7 @@ if (typeof isScrolling === 'undefined' && startedMoving) { isScrolling = Math.abs(deltaY) > Math.abs(deltaX); - } + } if (isScrolling) { return; @@ -110,7 +110,7 @@ slideNumber === lastSlide && deltaX < 0 ? (Math.abs(pageX) / sliderWidth) + 1.25 : 1; slider.style.webkitTransform = 'translate3d(' + offsetX + 'px,0,0)'; - + // started moving startedMoving = true; }; @@ -119,7 +119,7 @@ if (!slider || isScrolling) { return; } - + // were done moving startedMoving = false;