diff options
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx index dbd385047..520dd9c2d 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx @@ -79,8 +79,6 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> { @action toggleDisplay = (x: number, y: number) => { - // maxX and maxY will change if the UI/font size changes, but will work for any amount - // of items added to the menu if (this._shouldDisplay) { this._shouldDisplay = false; } else { @@ -107,8 +105,24 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> { } } - setDragStart = () => { + get templatesPreviewContents(){ + const tempArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + return ( + <div className='docCreatorMenu-preview-content'> + {tempArray.map(i => + <div + className='docCreatorMenu-preview-window' + > + + </div>)} + </div> + ); + } + get optionsMenuContents(){ + return ( + <div></div> + ); } render() { @@ -167,7 +181,21 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> { > <FontAwesomeIcon icon={this._menuContent === 'templates' ? 'table-cells' : 'window-maximize'}/> </button> - <button className='docCreatorMenu-menu-button close-menu'> + <button + className='docCreatorMenu-menu-button close-menu' + onPointerDown={e => + setupMoveUpEvents( + this, + e, + returnFalse, + emptyFunction, + undoable(clickEv => { + clickEv.stopPropagation(); + this.closeMenu(); + }, 'open actions menu') + ) + } + > <FontAwesomeIcon icon={'minus'}/> </button> <button className='docCreatorMenu-menu-button right'> @@ -175,15 +203,7 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> { </button> </div> <hr className='docCreatorMenu-menu-hr'/> - <div className='docCreatorMenu-content'> - {this._menuContent === 'templates' ? - <div> - </div> - : - <div> - </div> - } - </div> + {this._menuContent === 'templates' ? this.templatesPreviewContents : this.optionsMenuContents} </> } </div> |