mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-19 09:11:45 +03:00
Fix handling of touchmove events on Android
Dragging the canvas did not work on Android devices as the === check for lastTouch and the current event was always evaluating to false. Presumably Safari on iOS re-uses the same Touch object for touchmove events with the same finger, whereas Chrome/Firefox on Android creates new Touch objects for each event (so the === evaluates false). The code now compares Touch.identifier to ensure the new touch event is from the same finger as the initiating touchstart.
This commit is contained in:
parent
6b0cb75ed4
commit
3eac183d8c
@ -943,7 +943,7 @@
|
||||
if( event.touches.length === 1 &&
|
||||
event.targetTouches.length === 1 &&
|
||||
event.changedTouches.length === 1 &&
|
||||
THIS[ tracker.hash ].lastTouch === event.touches[ 0 ]){
|
||||
THIS[ tracker.hash ].lastTouch.identifier === event.touches[ 0 ].identifier){
|
||||
|
||||
onMouseMove( tracker, event.touches[ 0 ] );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user