fixes type error surrounding event.targetTouches

This commit is contained in:
jkleban
2015-09-28 11:58:11 -04:00
parent 76336e86ee
commit 450ddd0282
+2 -2
View File
@@ -79,7 +79,7 @@ KeyboardInputManager.prototype.listen = function () {
gameContainer.addEventListener(this.eventTouchstart, function (event) { gameContainer.addEventListener(this.eventTouchstart, function (event) {
if ((!window.navigator.msPointerEnabled && event.touches.length > 1) || if ((!window.navigator.msPointerEnabled && event.touches.length > 1) ||
event.targetTouches > 1) { event.targetTouches.length > 1) {
return; // Ignore if touching with more than 1 finger return; // Ignore if touching with more than 1 finger
} }
@@ -100,7 +100,7 @@ KeyboardInputManager.prototype.listen = function () {
gameContainer.addEventListener(this.eventTouchend, function (event) { gameContainer.addEventListener(this.eventTouchend, function (event) {
if ((!window.navigator.msPointerEnabled && event.touches.length > 0) || if ((!window.navigator.msPointerEnabled && event.touches.length > 0) ||
event.targetTouches > 0) { event.targetTouches.length > 0) {
return; // Ignore if still touching with one or more fingers return; // Ignore if still touching with one or more fingers
} }