提交 c1a355d9 编写于 作者: I isidor

touch: remove prevent default which causes warnings. And respect initialTarget...

touch: remove prevent default which causes warnings. And respect initialTarget also for the move event
上级 00db1968
......@@ -113,7 +113,6 @@ export class Gesture implements IDisposable {
private onTouchStart(e: TouchEvent): void {
let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.
e.preventDefault();
if (this.handle) {
this.handle.dispose();
......@@ -253,7 +252,6 @@ export class Gesture implements IDisposable {
private onTouchMove(e: TouchEvent): void {
let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.
e.preventDefault();
e.stopPropagation();
for (let i = 0, len = e.changedTouches.length; i < len; i++) {
......@@ -270,6 +268,7 @@ export class Gesture implements IDisposable {
let evt = this.newGestureEvent(EventType.Change);
evt.translationX = touch.pageX - arrays.tail(data.rollingPageX);
evt.translationY = touch.pageY - arrays.tail(data.rollingPageY);
evt.initialTarget = data.initialTarget;
evt.pageX = touch.pageX;
evt.pageY = touch.pageY;
this.dispatchEvent(evt);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册