diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 4 | ||||
-rw-r--r-- | src/client/views/nodes/LinkMenu.scss | 19 | ||||
-rw-r--r-- | src/client/views/nodes/LinkMenu.tsx | 45 |
3 files changed, 68 insertions, 0 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index fb8a724c5..67031ee0f 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -7,6 +7,7 @@ import { KeyStore } from '../../fields/KeyStore' import { NumberField } from "../../fields/NumberField"; import { props } from "bluebird"; import { DragManager } from "../util/DragManager"; +import { LinkMenu } from "./nodes/LinkMenu"; @observer @@ -57,6 +58,9 @@ export class DocumentDecorations extends React.Component { } onLinkButtonDown = (e: React.PointerEvent): void => { + // if () + // let linkMenu = new LinkMenu(SelectionManager.SelectedDocuments()[0]); + // linkMenu.Hidden = false; console.log("down"); e.stopPropagation(); document.removeEventListener("pointermove", this.onLinkButtonMoved) diff --git a/src/client/views/nodes/LinkMenu.scss b/src/client/views/nodes/LinkMenu.scss index e69de29bb..141d1fbf1 100644 --- a/src/client/views/nodes/LinkMenu.scss +++ b/src/client/views/nodes/LinkMenu.scss @@ -0,0 +1,19 @@ +#menu-container { + width: 180px; + height: 250px; + display: flex; + flex-direction: column; + background: red; +} + +#search-bar { + width: 100%; + margin: 2%; +} + +#link-list { + width: 100%; + height: 100px; + overflow-y: scroll; + background: black; +}
\ No newline at end of file diff --git a/src/client/views/nodes/LinkMenu.tsx b/src/client/views/nodes/LinkMenu.tsx index e69de29bb..2394852b2 100644 --- a/src/client/views/nodes/LinkMenu.tsx +++ b/src/client/views/nodes/LinkMenu.tsx @@ -0,0 +1,45 @@ +import { observable, computed, action } from "mobx"; +import React = require("react"); +import { SelectionManager } from "../../util/SelectionManager"; +import { observer } from "mobx-react"; +import './LinkMenu.scss' +import { KeyStore } from '../../../fields/KeyStore' +import { NumberField } from "../../../fields/NumberField"; +import { props } from "bluebird"; +import { DragManager } from "../../util/DragManager"; +import { DocumentView } from "./DocumentView"; + + +@observer +export class LinkMenu extends React.Component { + static Instance: LinkMenu + @observable private _docView: DocumentView; + @observable private _hidden = true; + + constructor(docView: DocumentView) { + super(docView); + this._docView = docView; + LinkMenu.Instance = this; + } + + @computed + public get Hidden() { return this._hidden; } + public set Hidden(value: boolean) { this._hidden = value; } + + render() { + if (this.Hidden) { + return (null); + } + + return ( + <div id="menu-container"> + <input id="search-bar" type="text" placeholder="Search..."></input> + <div id="link-list"> + + </div> + + </div> + ) + } + +}
\ No newline at end of file |