From b84439a5a585508072da6c41c72bda2844e33b6d Mon Sep 17 00:00:00 2001 From: rkusa Date: Thu, 11 Jun 2015 18:29:04 +0200 Subject: [PATCH] fix mobile chrome drop animation Refs #40 --- touch-dnd.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/touch-dnd.js b/touch-dnd.js index 98ca9d6..4a18b5f 100644 --- a/touch-dnd.js +++ b/touch-dnd.js @@ -255,8 +255,8 @@ var rect = el.getBoundingClientRect() this.origin.x = rect.left + (window.scrollX || window.pageXOffset) - this.origin.offset.x this.origin.y = rect.top + (window.scrollY || window.pageYOffset) - this.origin.offset.y - var pageX = getTouchPageX(e) - , pageY = getTouchPageY(e) + var pageX = getTouchPageX(e) || this.lastX + , pageY = getTouchPageY(e) || this.lastY , deltaX = pageX - this.origin.x , deltaY = pageY - this.origin.y translate(el, deltaX, deltaY)