From 42df7429d0b1da8739d788e035968a653b320328 Mon Sep 17 00:00:00 2001 From: Hannah Chow Date: Sat, 2 Mar 2019 18:32:32 -0500 Subject: added flyout packages and linkmenu shell + slight styling: --- src/client/views/DocumentDecorations.tsx | 4 +++ src/client/views/nodes/LinkMenu.scss | 19 ++++++++++++++ src/client/views/nodes/LinkMenu.tsx | 45 ++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) (limited to 'src') 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 ( + + ) + } + +} \ No newline at end of file -- cgit v1.2.3-70-g09d2