From 513ff1ec32cf16004420a8b28c0f79a274aaad7f Mon Sep 17 00:00:00 2001 From: Robin Larson Date: Thu, 20 Mar 2014 13:33:16 -0400 Subject: [PATCH] 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. --- src/Stage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stage.js b/src/Stage.js index 143d8458..ac26910d 100644 --- a/src/Stage.js +++ b/src/Stage.js @@ -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];