aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-23 11:56:35 -0400
committerbobzel <zzzman@gmail.com>2020-09-23 11:56:35 -0400
commitb97e7dcb31f4f8812d86b9b1944b912b544f3824 (patch)
tree1906cf17c08c49be6310f21052e9257a8c57ecfb /src/client/views/nodes/DocumentView.tsx
parenta4085fdcd9841a30dbc08a04a3bf6cd208e246f0 (diff)
fixed link rendering to be less computationally inefficient
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 3d3599476..32c6fce36 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -208,7 +208,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
// this._mainCont.current && (this.holdDisposer = InteractionUtils.MakeHoldTouchTarget(this._mainCont.current, this.handle1PointerHoldStart.bind(this)));
if (!BoolCast(this.rootDoc.dontRegisterView, this.props.dontRegisterView)) {
- DocumentManager.Instance.DocumentViews.push(this);
+ DocumentManager.Instance.AddView(this);
}
}
@@ -234,8 +234,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
this._holdDisposer?.();
Doc.UnBrushDoc(this.props.Document);
if (!this.props.dontRegisterView) {
- const index = DocumentManager.Instance.DocumentViews.indexOf(this);
- index !== -1 && DocumentManager.Instance.DocumentViews.splice(index, 1);
+ DocumentManager.Instance.RemoveView(this);
}
}