diff --git a/src/components/in-world-hud.js b/src/components/in-world-hud.js index cdf18ee62a5f71b75783002ed252c972261d9910..1bee398de9521f9a12e7fd0eb12b2af035a89041 100644 --- a/src/components/in-world-hud.js +++ b/src/components/in-world-hud.js @@ -50,7 +50,7 @@ AFRAME.registerComponent("in-world-hud", { this.mic.addEventListener("click", this.onMicClick); this.freeze.addEventListener("click", this.onFreezeClick); - this.pen.addEventListener("click", this.onPenClick); + this.pen.addEventListener("mousedown", this.onPenClick); }, pause() { @@ -59,6 +59,6 @@ AFRAME.registerComponent("in-world-hud", { this.mic.removeEventListener("click", this.onMicClick); this.freeze.removeEventListener("click", this.onFreezeClick); - this.pen.removeEventListener("click", this.onPenClick); + this.pen.removeEventListener("mousedown", this.onPenClick); } }); diff --git a/src/utils/action-event-handler.js b/src/utils/action-event-handler.js index 3faacd7d75c420657c50918cc3bae0fb27d3f6e2..8d01220ee69a56e7f855d076a3de37ba758f91b8 100644 --- a/src/utils/action-event-handler.js +++ b/src/utils/action-event-handler.js @@ -68,6 +68,8 @@ export default class ActionEventHandler { let scrollX = e.detail.axis[0] * SCROLL_MODIFIER; scrollX = Math.abs(scrollX) > SCROLL_THRESHOLD ? scrollX : 0; + this.isCursorInteracting = this.cursor.isInteracting(); + if ( Math.abs(scrollY) > 0 && (this.lastVerticalScrollTime === 0 || this.lastVerticalScrollTime + VERTICAL_SCROLL_TIMEOUT < Date.now())