diff --git a/js/drag.js b/js/drag.js index ad199001..d993b202 100644 --- a/js/drag.js +++ b/js/drag.js @@ -218,7 +218,6 @@ proto.dragMove = function( event, pointer, moveVector ) { } event.preventDefault(); - this.previousDragX = this.dragX; // reverse if right-to-left var direction = this.options.rightToLeft ? -1 : 1; if ( this.options.wrapAround ) { @@ -235,6 +234,10 @@ proto.dragMove = function( event, pointer, moveVector ) { dragX = dragX < endBound ? ( dragX + endBound ) * 0.5 : dragX; } + if (this.dragX !== dragX) { + this.previousDragX = this.dragX; + } + this.dragX = dragX; this.dragMoveTime = new Date();