diff options
author | geireann <60007097+geireann@users.noreply.github.com> | 2020-06-17 18:38:25 +0800 |
---|---|---|
committer | geireann <60007097+geireann@users.noreply.github.com> | 2020-06-17 18:38:25 +0800 |
commit | 0a60a9861c21efc95cb8f98b44b1ee02c5ebda02 (patch) | |
tree | 0ad8aea9475571653a7e629ae9ba36b9271a8c1e | |
parent | 22649d15932f719e0b57166158a3660941a7ef72 (diff) | |
parent | 5b7b2a3e083d532758409474b8549b7bc16e7a4e (diff) |
Merge branch 'mobile_revision_direct' of https://github.com/browngraphicslab/Dash-Web into mobile_revision_direct
-rw-r--r-- | src/client/views/collections/collectionFreeForm/InkOptionsMenu.tsx | 2 | ||||
-rw-r--r-- | src/mobile/MobileInterface.scss | 2 | ||||
-rw-r--r-- | src/mobile/MobileInterface.tsx | 10 | ||||
-rw-r--r-- | src/mobile/MobileMenu.scss | 8 |
4 files changed, 18 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionFreeForm/InkOptionsMenu.tsx b/src/client/views/collections/collectionFreeForm/InkOptionsMenu.tsx index 8bebcd047..e7ef4cbd2 100644 --- a/src/client/views/collections/collectionFreeForm/InkOptionsMenu.tsx +++ b/src/client/views/collections/collectionFreeForm/InkOptionsMenu.tsx @@ -107,7 +107,7 @@ export default class InkOptionsMenu extends AntimodeMenu { onPointerDown={action(e => GestureOverlay.Instance.InkShape = btn)} style={{ backgroundColor: btn === GestureOverlay.Instance?.InkShape ? "121212" : "" }}> {this._icons[i]} - </button>)}, + </button>)} </>; } diff --git a/src/mobile/MobileInterface.scss b/src/mobile/MobileInterface.scss index 215ce02e5..86b043590 100644 --- a/src/mobile/MobileInterface.scss +++ b/src/mobile/MobileInterface.scss @@ -33,4 +33,4 @@ position: relative; touch-action: none; background-color: pink; -}
\ No newline at end of file +} diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx index 7af11a9c4..68fb8b28f 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -79,6 +79,11 @@ export class MobileInterface extends React.Component { document.addEventListener("dblclick", this.onReactDoubleClick); } + @action + componentWillUnmount = () => { + document.removeEventListener('dblclick', this.onReactDoubleClick); + } + // Prevent zooming in when double tapping the screen onReactDoubleClick = (e: MouseEvent) => { e.stopPropagation(); @@ -316,8 +321,9 @@ export class MobileInterface extends React.Component { this._child = null; this.switchCurrentView((userDoc: Doc) => doc); this._parents.length = index; - } else if (doc === this._homeDoc) this.returnHome(); - else { + } else if (doc === this._homeDoc) { + this.returnHome(); + } else { this._activeDoc = doc; this._child = doc; this.switchCurrentView((userDoc: Doc) => doc); diff --git a/src/mobile/MobileMenu.scss b/src/mobile/MobileMenu.scss index 3126a7d0e..55c62f458 100644 --- a/src/mobile/MobileMenu.scss +++ b/src/mobile/MobileMenu.scss @@ -20,6 +20,7 @@ body { height: $navbar-height; background-color: whitesmoke; border-bottom: 5px solid black; + z-index: 150; } .navbar .cover { @@ -55,6 +56,11 @@ body { user-select: none; text-transform: uppercase; font-family: Arial, Helvetica, sans-serif; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + direction: ltr; + width: 600px; } .navbar .toggle-btn span { @@ -192,8 +198,10 @@ body { .sidebar.active { + position: absolute; right: 0%; opacity: 1; + z-index: 101; } .back { |