aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GestureOverlay.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/GestureOverlay.tsx')
-rw-r--r--src/client/views/GestureOverlay.tsx56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/client/views/GestureOverlay.tsx b/src/client/views/GestureOverlay.tsx
index 4e9b87eea..b85f35fe4 100644
--- a/src/client/views/GestureOverlay.tsx
+++ b/src/client/views/GestureOverlay.tsx
@@ -144,34 +144,34 @@ export default class GestureOverlay extends Touchable {
}
)
);
- // if (this.prevPoints.size === 1 && this._holdTimer === undefined) {
- // console.log("started");
- // this._holdTimer = setTimeout(() => {
- // console.log("hold");
- // const target = document.elementFromPoint(te.changedTouches.item(0).clientX, te.changedTouches.item(0).clientY);
- // target?.dispatchEvent(
- // new CustomEvent<InteractionUtils.MultiTouchEvent<React.TouchEvent>>("dashOnTouchHoldStart",
- // {
- // bubbles: true,
- // detail: {
- // fingers: this.prevPoints.size,
- // targetTouches: nts.ntt,
- // touches: nts.nt,
- // changedTouches: nts.nct,
- // touchEvent: te
- // }
- // }
- // )
- // );
- // this._holdTimer = undefined;
- // document.removeEventListener("touchmove", this.onReactTouchMove);
- // document.removeEventListener("touchend", this.onReactTouchEnd);
- // document.removeEventListener("touchmove", this.onReactHoldTouchMove);
- // document.removeEventListener("touchend", this.onReactHoldTouchEnd);
- // document.addEventListener("touchmove", this.onReactHoldTouchMove);
- // document.addEventListener("touchend", this.onReactHoldTouchEnd);
- // }, (1000));
- // }
+ if (this.prevPoints.size === 1 && this._holdTimer === undefined) {
+ console.log("started");
+ this._holdTimer = setTimeout(() => {
+ console.log("hold");
+ const target = document.elementFromPoint(te.changedTouches.item(0).clientX, te.changedTouches.item(0).clientY);
+ target?.dispatchEvent(
+ new CustomEvent<InteractionUtils.MultiTouchEvent<React.TouchEvent>>("dashOnTouchHoldStart",
+ {
+ bubbles: true,
+ detail: {
+ fingers: this.prevPoints.size,
+ targetTouches: nts.ntt,
+ touches: nts.nt,
+ changedTouches: nts.nct,
+ touchEvent: te
+ }
+ }
+ )
+ );
+ this._holdTimer = undefined;
+ document.removeEventListener("touchmove", this.onReactTouchMove);
+ document.removeEventListener("touchend", this.onReactTouchEnd);
+ document.removeEventListener("touchmove", this.onReactHoldTouchMove);
+ document.removeEventListener("touchend", this.onReactHoldTouchEnd);
+ document.addEventListener("touchmove", this.onReactHoldTouchMove);
+ document.addEventListener("touchend", this.onReactHoldTouchEnd);
+ }, (1000));
+ }
document.removeEventListener("touchmove", this.onReactTouchMove);
document.removeEventListener("touchend", this.onReactTouchEnd);
document.addEventListener("touchmove", this.onReactTouchMove);