when copying properties for touch events, make sure that those properties that might be different for each Touch object are not copied from the touch event

This commit is contained in:
tsauerwein
2014-02-19 15:45:13 +01:00
parent 7fbd11154b
commit 2e4badb7f3

View File

@@ -219,6 +219,13 @@ ol.pointer.TouchSource.prototype.touchToPointer_ =
e.isPrimary = this.isPrimaryTouch_(inTouch);
e.pointerType = this.POINTER_TYPE;
// make sure that the properties that are different for
// each `Touch` object are not copied from the BrowserEvent object
e.clientX = inTouch.clientX;
e.clientY = inTouch.clientY;
e.screenX = inTouch.screenX;
e.screenY = inTouch.screenY;
return e;
};