aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentLinksButton.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-02-09 12:16:25 -0500
committerbobzel <zzzman@gmail.com>2021-02-09 12:16:25 -0500
commit81bd2378ffa753e851390c2616e66a71d23c9989 (patch)
treee6b7c6cf1f1917144c813f0bbcccfab9f0757e6c /src/client/views/nodes/DocumentLinksButton.tsx
parent0f03183b9a2374ed3198d2b9ec8348fa819b11b4 (diff)
started to cleanup LinkDocPreview, LinkMenu.
Diffstat (limited to 'src/client/views/nodes/DocumentLinksButton.tsx')
-rw-r--r--src/client/views/nodes/DocumentLinksButton.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/nodes/DocumentLinksButton.tsx b/src/client/views/nodes/DocumentLinksButton.tsx
index defa4dbf0..13a6c9df8 100644
--- a/src/client/views/nodes/DocumentLinksButton.tsx
+++ b/src/client/views/nodes/DocumentLinksButton.tsx
@@ -33,16 +33,16 @@ interface DocumentLinksButtonProps {
@observer
export class DocumentLinksButton extends React.Component<DocumentLinksButtonProps, {}> {
private _linkButton = React.createRef<HTMLDivElement>();
-
@observable public static StartLink: Doc | undefined;
@observable public static StartLinkView: DocumentView | undefined;
@observable public static AnnotationId: string | undefined;
@observable public static AnnotationUri: string | undefined;
- @observable public static EditLink: DocumentView | undefined;
+ @observable public static LinkEditorDocView: DocumentView | undefined;
@observable public static invisibleWebDoc: Opt<Doc>;
public static invisibleWebRef = React.createRef<HTMLDivElement>();
+ @action public static ClearLinkEditor() { DocumentLinksButton.LinkEditorDocView = undefined; }
@action @undoBatch
onLinkButtonMoved = (e: PointerEvent) => {
if (this.props.InMenu && this.props.StartLink) {
@@ -83,7 +83,7 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp
DocumentLinksButton.StartLinkView = this.props.View;
}
} else if (!this.props.InMenu) {
- DocumentLinksButton.EditLink = this.props.View;
+ DocumentLinksButton.LinkEditorDocView = this.props.View;
}
}));
}
@@ -103,7 +103,7 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp
//action(() => Doc.BrushDoc(this.props.View.Document));
} else if (!this.props.InMenu) {
- DocumentLinksButton.EditLink = this.props.View;
+ DocumentLinksButton.LinkEditorDocView = this.props.View;
}
}
@@ -264,7 +264,7 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp
{this.linkButtonInner}
</Tooltip>
:
- !DocumentLinksButton.EditLink && !this.props.InMenu ?
+ !DocumentLinksButton.LinkEditorDocView && !this.props.InMenu ?
<Tooltip title={<><div className="dash-tooltip">{title}</div></>}>
{this.linkButtonInner}
</Tooltip>