diff options
| author | andrewdkim <adkim414@gmail.com> | 2019-10-01 18:55:50 -0400 |
|---|---|---|
| committer | andrewdkim <adkim414@gmail.com> | 2019-10-01 18:55:50 -0400 |
| commit | 23619154f8688ffcb25a988158d75934c0cacbf7 (patch) | |
| tree | d7462da0f0e8b9de091263af166959872e8af0f6 /src/client/views/linking/LinkMenuItem.tsx | |
| parent | 45b9f489033cd323614463ca9c36f41900bf1965 (diff) | |
| parent | 69e4a936c4eb0cc2e35e4e7f3258aed1f72b8da7 (diff) | |
still unfinished
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
| -rw-r--r-- | src/client/views/linking/LinkMenuItem.tsx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx index 19a0023e9..a6ee9c2c6 100644 --- a/src/client/views/linking/LinkMenuItem.tsx +++ b/src/client/views/linking/LinkMenuItem.tsx @@ -21,16 +21,14 @@ interface LinkMenuItemProps { sourceDoc: Doc; destinationDoc: Doc; showEditor: (linkDoc: Doc) => void; - addDocTab: (document: Doc, dataDoc: Doc | undefined, where: string) => void; + addDocTab: (document: Doc, dataDoc: Doc | undefined, where: string) => boolean; } @observer export class LinkMenuItem extends React.Component<LinkMenuItemProps> { private _drag = React.createRef<HTMLDivElement>(); @observable private _showMore: boolean = false; - @action toggleShowMore() { - this._showMore = !this._showMore; - } + @action toggleShowMore() { this._showMore = !this._showMore; } onEdit = (e: React.PointerEvent): void => { e.stopPropagation(); @@ -72,7 +70,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> { if (LinkFollowBox.Instance !== undefined) { LinkFollowBox.Instance.props.Document.isMinimized = false; LinkFollowBox.Instance.setLinkDocs(this.props.linkDoc, this.props.sourceDoc, this.props.destinationDoc); - LinkFollowBox.Instance.setAddDocTab(this.props.addDocTab); + LinkFollowBox.setAddDocTab(this.props.addDocTab); } e.stopPropagation(); } @@ -97,6 +95,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> { @action.bound async followDefault() { if (LinkFollowBox.Instance !== undefined) { + LinkFollowBox.setAddDocTab(this.props.addDocTab); LinkFollowBox.Instance.setLinkDocs(this.props.linkDoc, this.props.sourceDoc, this.props.destinationDoc); LinkFollowBox.Instance.defaultLinkBehavior(); } @@ -106,7 +105,6 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> { async openLinkFollower() { if (LinkFollowBox.Instance !== undefined) { LinkFollowBox.Instance.props.Document.isMinimized = false; - MainView.Instance.toggleLinkFollowBox(false); LinkFollowBox.Instance.setLinkDocs(this.props.linkDoc, this.props.sourceDoc, this.props.destinationDoc); } } |
