Skip to content

Commit 0161e1d

Browse files
committed
Handle touchup / touchend events in MX Ink controls so drawing works when tip is pressed
1 parent 714f012 commit 0161e1d

File tree

1 file changed

+2
-0
lines changed
  • examples/showcase/painter/components

1 file changed

+2
-0
lines changed

‎examples/showcase/painter/components/brush.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ AFRAME.registerComponent('brush', {
1717

1818
this.onButtonDown = this.onButtonDown.bind(this);
1919
el.addEventListener('buttondown', this.onButtonDown);
20+
el.addEventListener('touchstart', this.onButtonDown);
2021

2122
this.onButtonUp = this.onButtonUp.bind(this);
2223
el.addEventListener('buttonup', this.onButtonUp);
24+
el.addEventListener('touchend', this.onButtonUp);
2325

2426
this.onControllerConnected = this.onControllerConnected.bind(this);
2527
el.addEventListener('controllerconnected', this.onControllerConnected);

0 commit comments

Comments
 (0)