|
@ -163,7 +163,7 @@ class Canvas { |
|
|
this.hammer = new Hammer(this.frame.canvas); |
|
|
this.hammer = new Hammer(this.frame.canvas); |
|
|
this.hammer.get('pinch').set({enable: true}); |
|
|
this.hammer.get('pinch').set({enable: true}); |
|
|
// enable to get better response, todo: test on mobile.
|
|
|
// enable to get better response, todo: test on mobile.
|
|
|
this.hammer.get('pan').set({threshold:5, direction:30}); |
|
|
|
|
|
|
|
|
this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer.
|
|
|
|
|
|
|
|
|
hammerUtil.onTouch(this.hammer, (event) => {this.body.eventListeners.onTouch(event)}); |
|
|
hammerUtil.onTouch(this.hammer, (event) => {this.body.eventListeners.onTouch(event)}); |
|
|
this.hammer.on('tap', (event) => {this.body.eventListeners.onTap(event)}); |
|
|
this.hammer.on('tap', (event) => {this.body.eventListeners.onTap(event)}); |
|
|