From f45295a34fdad5d1b49456ae7ac8fa2be6f4c96a Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Tue, 1 Sep 2020 01:50:00 -0500 Subject: initial commit --- src/client/views/ContextMenuItem.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/ContextMenuItem.tsx b/src/client/views/ContextMenuItem.tsx index 22bfbe217..7e3be0d61 100644 --- a/src/client/views/ContextMenuItem.tsx +++ b/src/client/views/ContextMenuItem.tsx @@ -51,6 +51,7 @@ export class ContextMenuItem extends React.Component { if (this.currentTimeout) { clearTimeout(this.currentTimeout); @@ -60,6 +61,7 @@ export class ContextMenuItem extends React.Component this.overItem = true), ContextMenuItem.timeout); } @@ -75,6 +77,9 @@ export class ContextMenuItem extends React.Component @@ -91,8 +96,10 @@ export class ContextMenuItem extends React.Component window.innerHeight * 2 / 3 ? "flex-end" : "center"; const marginTop = !this.overItem ? "" : this._overPosY < window.innerHeight / 3 ? "20px" : this._overPosY > window.innerHeight * 2 / 3 ? "-20px" : ""; + + // this LINE!! const submenu = !this.overItem ? (null) : -
+
{this._items.map(prop => )}
; if (!("noexpand" in this.props)) { -- cgit v1.2.3-70-g09d2 From 06b54eb074814a0ead9b89e9143872c7f92361da Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Wed, 2 Sep 2020 01:25:40 -0500 Subject: context menu bug fix --- src/client/views/ContextMenu.tsx | 2 +- src/client/views/ContextMenuItem.tsx | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/ContextMenu.tsx b/src/client/views/ContextMenu.tsx index 349fd077c..952100cb0 100644 --- a/src/client/views/ContextMenu.tsx +++ b/src/client/views/ContextMenu.tsx @@ -215,7 +215,7 @@ export class ContextMenu extends React.Component { @computed get menuItems() { if (!this._searchString) { - return this._items.map(item => ); + return this._items.map(item => ); } return this.filteredViews; } diff --git a/src/client/views/ContextMenuItem.tsx b/src/client/views/ContextMenuItem.tsx index 7e3be0d61..7277c589d 100644 --- a/src/client/views/ContextMenuItem.tsx +++ b/src/client/views/ContextMenuItem.tsx @@ -4,6 +4,7 @@ import { observer } from "mobx-react"; import { IconProp } from '@fortawesome/fontawesome-svg-core'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { UndoManager } from "../util/UndoManager"; +import { NumberLiteralType } from "typescript"; export interface OriginalMenuProps { description: string; @@ -28,6 +29,7 @@ export type ContextMenuProps = OriginalMenuProps | SubmenuProps; export class ContextMenuItem extends React.Component { @observable private _items: Array = []; @observable private overItem = false; + @observable private subRef = React.createRef(); constructor(props: ContextMenuProps | SubmenuProps) { super(props); @@ -61,7 +63,7 @@ export class ContextMenuItem extends React.Component this.overItem = true), ContextMenuItem.timeout); } @@ -97,9 +99,12 @@ export class ContextMenuItem extends React.Component window.innerHeight * 2 / 3 ? "flex-end" : "center"; const marginTop = !this.overItem ? "" : this._overPosY < window.innerHeight / 3 ? "20px" : this._overPosY > window.innerHeight * 2 / 3 ? "-20px" : ""; - // this LINE!! + // here const submenu = !this.overItem ? (null) : -
+
0 ? "90%" : "20%", marginTop + }}> {this._items.map(prop => )}
; if (!("noexpand" in this.props)) { -- cgit v1.2.3-70-g09d2 From ccfcbd7394dc643babc390797ffc3bea71d9f84c Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Wed, 2 Sep 2020 01:36:15 -0500 Subject: got rid of layout check --- src/client/views/ContextMenuItem.tsx | 2 +- src/client/views/PropertiesView.tsx | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'src') diff --git a/src/client/views/ContextMenuItem.tsx b/src/client/views/ContextMenuItem.tsx index 7277c589d..eddecb7a7 100644 --- a/src/client/views/ContextMenuItem.tsx +++ b/src/client/views/ContextMenuItem.tsx @@ -103,7 +103,7 @@ export class ContextMenuItem extends React.Component 0 ? "90%" : "20%", marginTop + marginLeft: window.innerHeight - this._overPosX - 50 > 0 ? "90%" : "20%", marginTop }}> {this._items.map(prop => )}
; diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 1768b5c41..7f075d2cd 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -900,14 +900,6 @@ export class PropertiesView extends React.Component {
{!this.openSharing ? (null) :
-
- this.layoutDocAcls = !this.layoutDocAcls)} - checked={this.layoutDocAcls} - />; -
Layout
-
{this.sharingTable} {/*