aboutsummaryrefslogtreecommitdiff
path: root/src/mobile/MobileInterface.tsx
diff options
context:
space:
mode:
authorgeireann <60007097+geireann@users.noreply.github.com>2020-06-16 01:35:34 +0800
committergeireann <60007097+geireann@users.noreply.github.com>2020-06-16 01:35:34 +0800
commite9fec777255051c579cd5468b4f0ff735a6e06ab (patch)
tree14e32b72e560fbfabc667f3c1378c49ea012a26d /src/mobile/MobileInterface.tsx
parent87aa11c70be1ae0270c69adc0c1e0219f79ce820 (diff)
parent3dab85351e1fe862a54294cec70e7139abea0d7d (diff)
Merge branch 'mobile_revision_direct' of https://github.com/browngraphicslab/Dash-Web into mobile_revision_direct
Diffstat (limited to 'src/mobile/MobileInterface.tsx')
-rw-r--r--src/mobile/MobileInterface.tsx24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx
index 211cc7a1a..979094dda 100644
--- a/src/mobile/MobileInterface.tsx
+++ b/src/mobile/MobileInterface.tsx
@@ -39,6 +39,7 @@ import { SelectionManager } from "../client/util/SelectionManager";
import { SketchPicker } from "react-color";
import { ScriptField } from "../fields/ScriptField";
import InkOptionsMenu from "../client/views/collections/collectionFreeForm/InkOptionsMenu";
+import { RadialMenu } from "../client/views/nodes/RadialMenu";
library.add(faTasks, faMobile, faThLarge, faWindowClose, faEdit, faTrashAlt, faPalette, faAngleRight, faBell, faTrash, faCamera, faExpand, faCaretDown, faCaretLeft, faCaretRight, faCaretSquareDown, faCaretSquareRight, faArrowsAltH, faPlus, faMinus,
faTerminal, faToggleOn, fileSolid, faExternalLinkAlt, faLocationArrow, faSearch, faFileDownload, faStop, faCalculator, faWindowMaximize, faAddressCard,
@@ -87,6 +88,14 @@ export class MobileInterface extends React.Component {
this._homeDoc._viewType === "stacking" ? this.menuListView = true : this.menuListView = false;
Doc.SetSelectedTool(InkTool.None);
this.switchCurrentView((userDoc: Doc) => this._homeDoc);
+
+ document.removeEventListener("dblclick", this.onReactDoubleClick);
+ document.addEventListener("dblclick", this.onReactDoubleClick);
+ }
+
+ onReactDoubleClick = (e: MouseEvent) => {
+ console.log("tapped");
+ e.stopPropagation();
}
@action
@@ -499,20 +508,20 @@ export class MobileInterface extends React.Component {
const button = document.getElementById("inkButton") as HTMLElement;
// const color = InkingControl.Instance.selectedColor;
const color = "lightpink";
- button.style.backgroundColor = this._ink ? "white" : color;
+ button.style.backgroundColor = this._ink ? "white" : "black";
button.style.color = this._ink ? "black" : "white";
if (!this._ink) {
console.log("INK IS ACTIVE");
// InkingControl.Instance.switchTool(InkTool.Pen);
Doc.SetSelectedTool(InkTool.Pen);
- InkOptionsMenu.Instance.jumpTo(300, 300);
+ //InkOptionsMenu.Instance.jumpTo(300, 300);
this._ink = true;
} else {
console.log("INK IS INACTIVE");
// InkingControl.Instance.switchTool(InkTool.None);
Doc.SetSelectedTool(InkTool.None);
- InkOptionsMenu.Instance.fadeOut(true);
+ //InkOptionsMenu.Instance.fadeOut(true);
this._ink = false;
}
}
@@ -520,7 +529,11 @@ export class MobileInterface extends React.Component {
inkMenu = () => {
if (this._activeDoc._viewType === "docking") {
if (this._ink) {
- return <InkOptionsMenu />
+ console.log("here");
+ return <div className="colorSelector">
+ <InkOptionsMenu />
+ </div>
+
}
}
}
@@ -724,8 +737,8 @@ export class MobileInterface extends React.Component {
{this.drawInk()}
{this.uploadAudioButton()}
{/* {this.colorTool()} */}
- {this.inkMenu()}
</div>
+ {this.inkMenu()}
<GestureOverlay>
{this.displayWorkspaces()}
{this.renderDefaultContent()}
@@ -764,7 +777,6 @@ export class MobileInterface extends React.Component {
} else if (!this.imageUploadActive) {
}
- console.log("upload");
return (
<div>
<div className="closeUpload" onClick={this.toggleUpload}>