diff options
author | Stanley Yip <stanley_yip@brown.edu> | 2020-02-23 14:24:07 -0500 |
---|---|---|
committer | Stanley Yip <stanley_yip@brown.edu> | 2020-02-23 14:24:07 -0500 |
commit | f1fcbeea5fb103b7623e795e72aacd4dfacc6c70 (patch) | |
tree | b599d8743157ea6552714949e998ae0954f3d854 /src/client/views/nodes/RadialMenu.tsx | |
parent | a8b19e82d8c9a8350609e64e60848dbfbbbb6dcd (diff) | |
parent | 0299ecb4db88560fe623b429f36191402c00b264 (diff) |
final commits before demo
Diffstat (limited to 'src/client/views/nodes/RadialMenu.tsx')
-rw-r--r-- | src/client/views/nodes/RadialMenu.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/nodes/RadialMenu.tsx b/src/client/views/nodes/RadialMenu.tsx index a6fb72a7b..d7f7c2e33 100644 --- a/src/client/views/nodes/RadialMenu.tsx +++ b/src/client/views/nodes/RadialMenu.tsx @@ -5,6 +5,8 @@ import { RadialMenuItem, RadialMenuProps } from "./RadialMenuItem"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Measure from "react-measure"; import "./RadialMenu.scss"; +import MobileInkOverlay from "../../../mobile/MobileInkOverlay"; +import MobileInterface from "../../../mobile/MobileInterface"; @observer export class RadialMenu extends React.Component { @@ -23,6 +25,8 @@ export class RadialMenu extends React.Component { @observable private _mouseDown: boolean = false; private _reactionDisposer?: IReactionDisposer; + public used: boolean = false; + catchTouch = (te: React.TouchEvent) => { console.log("caught"); @@ -35,6 +39,7 @@ export class RadialMenu extends React.Component { this._mouseDown = true; this._mouseX = e.clientX; this._mouseY = e.clientY; + this.used = false; document.addEventListener("pointermove", this.onPointerMove); } @@ -68,6 +73,7 @@ export class RadialMenu extends React.Component { } @action onPointerUp = (e: PointerEvent) => { + this.used = true; this._mouseDown = false; const curX = e.clientX; const curY = e.clientY; @@ -213,7 +219,7 @@ export class RadialMenu extends React.Component { render() { - if (!this._display) { + if (!this._display || MobileInterface.Instance) { return null; } const style = this._yRelativeToTop ? { left: this._pageX - 130, top: this._pageY - 130 } : |