diff options
author | bobzel <zzzman@gmail.com> | 2021-03-24 18:50:27 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-03-24 18:50:27 -0400 |
commit | 147cd8618023884b9eb60a79d5efe53abefe9c47 (patch) | |
tree | 539ce5231106bc480ca1c57dcec2e47517921aa3 /src/client/views/nodes/DocumentView.tsx | |
parent | cb082c8912156eb6c6f20f6a3b4d6350283fe2d2 (diff) |
redid how LinkManager stores links on documents by putting them on the Doc itself instead of as a computedFn. This has a signifcant effect on efficiency since adding a link to one document will no longer invalidate every other view that references *any* document's links
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index aff0efdc7..df769a407 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -795,7 +795,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps layoutKey={this.finalLayoutKey} /> {this.layoutDoc.hideAllLinks ? (null) : this.allLinkEndpoints} {this.hideLinkButton ? (null) : - <DocumentLinksButton View={this.props.DocumentView()} links={this.allLinks} Offset={[this.topMost ? 0 : -15, undefined, undefined, this.topMost ? 10 : -20]} />} + <DocumentLinksButton View={this.props.DocumentView()} Offset={[this.topMost ? 0 : -15, undefined, undefined, this.topMost ? 10 : -20]} />} {audioView} </div>; @@ -814,7 +814,6 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps TraceMobx(); if (this.props.LayoutTemplateString?.includes(LinkAnchorBox.name)) return null; if (this.layoutDoc.presBox || this.rootDoc.type === DocumentType.LINK || this.props.dontRegisterView) return (null); - // need to use allLinks for RTF since embedded linked text anchors are not rendered with DocumentViews. All other documents render their anchors with nested DocumentViews so we just need to render the directLinks here const filtered = DocUtils.FilterDocs(this.rootDoc.type === DocumentType.RTF ? this.allLinks : this.directLinks, this.props.docFilters(), []).filter(d => !d.hidden); return filtered.map((link, i) => |