From 9588c702fee4fdae4a9f92dbd0eb05afa83cc937 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 24 Dec 2019 10:54:00 -0500 Subject: [PATCH] iOS 13 bugfix --- js/drag.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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();