diff options
author | bobzel <zzzman@gmail.com> | 2023-12-29 10:50:42 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-12-29 10:50:42 -0500 |
commit | 1a3aa8a4e79deb501fce0c89ace8ea960003d8cd (patch) | |
tree | 92efd03eb41a1123bc54519e0e644cafb903e9ff /src/client/views/nodes/DocumentView.tsx | |
parent | bc8d4b46cdc836cbd59527ebfd1d891949d6e5ff (diff) |
fixed sidebar button highoighting. fixed explore mode.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 336f65b85..cc7fca8d2 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -712,7 +712,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps } const cm = ContextMenu.Instance; - if (!cm || (e as any)?.nativeEvent?.SchemaHandled || DocumentView.ExploreMode) return; + if (!cm || (e as any)?.nativeEvent?.SchemaHandled || SnappingManager.ExploreMode) return; if (e && !(e.nativeEvent as any).dash) { const onDisplay = () => { @@ -1337,10 +1337,8 @@ export class DocumentView extends ObservableReactComponent<DocumentViewProps> { runInAction(() => (this._selected = val)); } @observable public static LongPress = false; - @observable public static ExploreMode = false; - @observable public static LastPressedSidebarBtn: Opt<Doc> = undefined; // bcz: this is a hack to handle highlighting buttons in the leftpanel menu .. need to find a cleaner approach @computed public static get exploreMode() { - return () => (DocumentView.ExploreMode ? ScriptField.MakeScript('CollectionBrowseClick(documentView, clientX, clientY)', { documentView: 'any', clientX: 'number', clientY: 'number' })! : undefined); + return () => (SnappingManager.ExploreMode ? ScriptField.MakeScript('CollectionBrowseClick(documentView, clientX, clientY)', { documentView: 'any', clientX: 'number', clientY: 'number' })! : undefined); } @observable public docView: DocumentViewInternal | undefined | null = undefined; @observable public textHtmlOverlay: Opt<string> = undefined; |