mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Update Stage.js
At this time, only single finger touch is supported. However, if the first pointer event the stage receives is a multi-touch event, the value of stage.pointerPos will be left undefined. This causes: ``` `TypeError: 'undefined' is not an object (evaluating 'pos.x')` ``` in all internal the touch event handers. I suggest always using the location of the first finger in this case.
This commit is contained in:
parent
40dfbef81e
commit
513ff1ec32
@ -597,7 +597,7 @@
|
||||
// touch events
|
||||
if(evt.touches !== undefined) {
|
||||
// currently, only handle one finger
|
||||
if (evt.touches.length === 1) {
|
||||
if (evt.touches.length > 0) {
|
||||
|
||||
touch = evt.touches[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user