diff options
author | bobzel <zzzman@gmail.com> | 2021-02-16 14:39:41 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-16 14:39:41 -0500 |
commit | 3dae4d3d8ac10f6f3c9f937282dbfa5882584aad (patch) | |
tree | acf520396f5b68c6fbed342a959f823b021bb018 /src/client/views/nodes/LinkDocPreview.tsx | |
parent | 05a9a3eed9a1afb55ec0ca55845b33cc745289e0 (diff) |
added getAnchor() to freeformView to capture viewtype & filters. fixed setPanIntoView bug. added setViewSpec componentView method to allow anchor to set view specs.
Diffstat (limited to 'src/client/views/nodes/LinkDocPreview.tsx')
-rw-r--r-- | src/client/views/nodes/LinkDocPreview.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/nodes/LinkDocPreview.tsx b/src/client/views/nodes/LinkDocPreview.tsx index 7bd5d14d2..716810536 100644 --- a/src/client/views/nodes/LinkDocPreview.tsx +++ b/src/client/views/nodes/LinkDocPreview.tsx @@ -45,7 +45,11 @@ export class LinkDocPreview extends React.Component<LinkDocPreviewProps> { if (anchor1 && anchor2) { linkTarget = Doc.AreProtosEqual(anchor1, this._linkSrc) || Doc.AreProtosEqual(anchor1?.annotationOn as Doc, this._linkSrc) ? anchor2 : anchor1; } - linkTarget && DocCastAsync(linkTarget.annotationOn).then(action(anno => this._targetDoc = anno)); + if (linkTarget?.annotationOn) { + linkTarget && DocCastAsync(linkTarget.annotationOn).then(action(anno => this._targetDoc = anno)); + } else { + this._targetDoc = linkTarget; + } this._toolTipText = ""; } componentDidUpdate(props: any) { |