From 2a17392bd461bfdc669961c5bf8892b7cb6958d6 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 12 Mar 2021 17:49:35 -0500 Subject: trying to make treeViews more efficient by making fewer calls to Get document fields getter. --- .../collectionFreeForm/CollectionFreeFormView.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index ec5cb8a61..019fc9bae 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -455,7 +455,8 @@ export class CollectionFreeFormView extends CollectionSubView { - if (e.nativeEvent.cancelBubble || InteractionUtils.IsType(e, InteractionUtils.TOUCHTYPE) || InteractionUtils.IsType(e, InteractionUtils.PENTYPE) || (Doc.GetSelectedTool() === InkTool.Highlighter || Doc.GetSelectedTool() === InkTool.Pen)) { + if (e.nativeEvent.cancelBubble || InteractionUtils.IsType(e, InteractionUtils.TOUCHTYPE) || InteractionUtils.IsType(e, InteractionUtils.PENTYPE) || + ([InkTool.Pen, InkTool.Highlighter].includes(CurrentUserUtils.SelectedTool))) { return; } this._hitCluster = this.pickCluster(this.getTransform().transformPoint(e.clientX, e.clientY)); @@ -465,7 +466,7 @@ export class CollectionFreeFormView extends CollectionSubView