diff options
author | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-06-16 09:50:22 -0700 |
---|---|---|
committer | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-06-16 09:50:22 -0700 |
commit | 6d68abf588f7b6182a62b74882d1fdc09b2b0230 (patch) | |
tree | 7f985399484c4badbcc998b35584beef7a8ad824 /src | |
parent | 099a1942440efc2784bc9b2c5896777cf85842ec (diff) |
bug fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionFreeForm/InkOptionsMenu.tsx | 2 | ||||
-rw-r--r-- | src/mobile/MobileInterface.tsx | 30 | ||||
-rw-r--r-- | src/mobile/MobileMenu.scss | 3 |
3 files changed, 9 insertions, 26 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.tsx b/src/mobile/MobileInterface.tsx index 25dc9fd55..5d361f3ab 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -78,6 +78,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(); @@ -94,31 +99,6 @@ export class MobileInterface extends React.Component { this.renderView = renderView; } - onSwitchUpload = async () => { - let width = 300; - let height = 300; - const res = await rp.get(Utils.prepend("/getUserDocumentId")); - - // get width and height of the collection doc - if (this.mainContainer) { - const data = Cast(this.mainContainer.data, listSpec(Doc)); - if (data) { - const collectionDoc = await data[1]; // this should be the collection doc since the positions should be locked - const docView = DocumentManager.Instance.getDocumentView(collectionDoc); - if (docView) { - width = docView.nativeWidth ? docView.nativeWidth : 300; - height = docView.nativeHeight ? docView.nativeHeight : 300; - } - } - } - DocServer.Mobile.dispatchOverlayTrigger({ - enableOverlay: true, - width: width, - height: height, - text: "Documents uploaded from mobile will show here", - }); - } - // For toggling the hamburger menu @action toggleSidebar = () => this.sidebarActive = !this.sidebarActive diff --git a/src/mobile/MobileMenu.scss b/src/mobile/MobileMenu.scss index 8d996f779..cd531056e 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 { @@ -192,8 +193,10 @@ body { .sidebar.active { + position: absolute; right: 0%; opacity: 1; + z-index: 101; } .back { |