Browse files

Get rid of `touchIndex` property

  • Loading branch information...
1 parent 0088ffe commit b40554e59666669b012b5f06aec88aa62880fe56 @davidaurelio davidaurelio committed Feb 27, 2013
Showing with 3 additions and 7 deletions.
  1. +1 −4 src/renderer/event.js
  2. +2 −3 test/renderer/event-spec.js
View
5 src/renderer/event.js
@@ -86,7 +86,7 @@ define(function() {
this.clientY = clientY;
this.deltaX = this.deltaY = this.diffX = this.diffY =
this.isLeft = this.isRight = this.isMiddle =
- this.touchId = this.touchIndex = undefined;
+ this.touchId = undefined;
}
/**
* Creates a PointerEvent from a DOM MouseEvent or TouchEvent
@@ -122,7 +122,6 @@ define(function() {
);
};
- var indexOf = Array.prototype.indexOf;
PointerEvent.fromDomTouch = function(domTouch, domEvent, stageX, stageY) {
var clientX = domTouch.clientX, clientY = domTouch.clientY;
var pointerEvent = new PointerEvent(
@@ -133,7 +132,6 @@ define(function() {
clientY
);
pointerEvent.touchId = domTouch.identifier;
- pointerEvent.touchIndex = indexOf.call(domEvent.touches, domTouch);
return pointerEvent;
};
@@ -161,7 +159,6 @@ define(function() {
clone.isMiddle = this.isMiddle;
clone.isLeft = this.isLeft;
clone.touchId = this.touchId;
- clone.touchIndex = this.touchIndex;
return clone;
};
View
5 test/renderer/event-spec.js
@@ -42,11 +42,10 @@ define([
});
});
- it('should initialize the "touchId" and "touchIndex" properties to undefined (touch)', function() {
+ it('should initialize the "touchId" property to undefined (touch)', function() {
expect(new PointerEvent(type, stageX, stageY, clientX, clientY))
.toHaveOwnProperties({
- touchId: undefined,
- touchIndex: undefined
+ touchId: undefined
});
});

0 comments on commit b40554e

Please sign in to comment.