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/newlightbox | |
| parent | bc8d4b46cdc836cbd59527ebfd1d891949d6e5ff (diff) | |
fixed sidebar button highoighting. fixed explore mode.
Diffstat (limited to 'src/client/views/newlightbox')
| -rw-r--r-- | src/client/views/newlightbox/ButtonMenu/ButtonMenu.tsx | 5 | ||||
| -rw-r--r-- | src/client/views/newlightbox/NewLightboxView.tsx | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/newlightbox/ButtonMenu/ButtonMenu.tsx b/src/client/views/newlightbox/ButtonMenu/ButtonMenu.tsx index 3a95e5f74..72b63cf8f 100644 --- a/src/client/views/newlightbox/ButtonMenu/ButtonMenu.tsx +++ b/src/client/views/newlightbox/ButtonMenu/ButtonMenu.tsx @@ -8,6 +8,7 @@ import { DocumentView, OpenWhereMod } from '../../nodes/DocumentView'; import { NewLightboxView } from '../NewLightboxView'; import './ButtonMenu.scss'; import { IButtonMenu } from './utils'; +import { SnappingManager } from '../../../util/SnappingManager'; export const ButtonMenu = (props: IButtonMenu) => { return ( @@ -39,10 +40,10 @@ export const ButtonMenu = (props: IButtonMenu) => { <div className="newLightboxView-exploreBtn" title="toggle explore mode to navigate among documents only" - style={{ background: DocumentView.ExploreMode ? 'white' : undefined }} + style={{ background: SnappingManager.ExploreMode ? 'white' : undefined }} onClick={action(e => { e.stopPropagation(); - DocumentView.ExploreMode = !DocumentView.ExploreMode; + SnappingManager.SetExploreMode(!SnappingManager.ExploreMode); })}></div> </div> ); diff --git a/src/client/views/newlightbox/NewLightboxView.tsx b/src/client/views/newlightbox/NewLightboxView.tsx index f3cde3f5a..6980e31c1 100644 --- a/src/client/views/newlightbox/NewLightboxView.tsx +++ b/src/client/views/newlightbox/NewLightboxView.tsx @@ -23,6 +23,7 @@ import { emptyBounds, IBounds } from './ExploreView/utils'; import { NewLightboxHeader } from './Header'; import './NewLightboxView.scss'; import { RecommendationList } from './RecommendationList'; +import { SnappingManager } from '../../util/SnappingManager'; enum LightboxStatus { RECOMMENDATIONS = 'recommendations', @@ -126,7 +127,7 @@ export class NewLightboxView extends React.Component<LightboxViewProps> { this._docFilters && (this._docFilters.length = 0); this._future = this._history = []; Doc.ActiveTool = InkTool.None; - DocumentView.ExploreMode = false; + SnappingManager.SetExploreMode(false); } else { const l = DocUtils.MakeLinkToActiveAudio(() => doc).lastElement(); l && (Cast(l.link_anchor_2, Doc, null).backgroundColor = 'lightgreen'); |
