From: Robert Kaiser Date: Sun, 4 Sep 2016 22:07:35 +0000 (+0200) Subject: remove handling of touch IDs and just use first target touch item X-Git-Tag: production~47 X-Git-Url: https://git-public.kairo.at/?p=lantea.git;a=commitdiff_plain;h=aec007a668b2b61312c0974a8548ab0f616e704c;ds=sidebyside remove handling of touch IDs and just use first target touch item --- diff --git a/js/map.js b/js/map.js index d1f6b03..b63aea5 100644 --- a/js/map.js +++ b/js/map.js @@ -861,12 +861,12 @@ var mapEvHandler = { // Bail out if the started touch can't be found. if (touchEvent && gDragging && - !aEvent.changedTouches.identifiedTouch(gDragTouchID)) + !aEvent.targetTouches.item(0)) return; } var coordObj = touchEvent ? - aEvent.changedTouches.identifiedTouch(gDragTouchID) : + aEvent.targetTouches.item(0) : aEvent; switch (aEvent.type) { @@ -881,8 +881,7 @@ var mapEvHandler = { aEvent.targetTouches.item(0).clientY, 2) ); } - gDragTouchID = aEvent.changedTouches.item(0).identifier; - coordObj = aEvent.changedTouches.identifiedTouch(gDragTouchID); + coordObj = aEvent.targetTouches.item(0); } var x = coordObj.clientX - gGLMapCanvas.offsetLeft; var y = coordObj.clientY - gGLMapCanvas.offsetTop;