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:
Robin Larson 2014-03-20 13:33:16 -04:00
parent 40dfbef81e
commit 513ff1ec32

View File

@ -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];