From 76838b7b3842c9b184e6459e29796dd14de37e8d Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 1 May 2024 09:47:11 -0400 Subject: more cycle import removal. fixed ndollar bugs introduced during lint changes. --- src/client/views/nodes/FontIconBox/FontIconBox.tsx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/client/views/nodes/FontIconBox/FontIconBox.tsx') diff --git a/src/client/views/nodes/FontIconBox/FontIconBox.tsx b/src/client/views/nodes/FontIconBox/FontIconBox.tsx index d83690cdd..8d1617e66 100644 --- a/src/client/views/nodes/FontIconBox/FontIconBox.tsx +++ b/src/client/views/nodes/FontIconBox/FontIconBox.tsx @@ -11,8 +11,7 @@ import { BoolCast, DocCast, NumCast, ScriptCast, StrCast } from '../../../../fie import { emptyFunction } from '../../../../Utils'; import { Docs } from '../../../documents/Documents'; import { CollectionViewType, DocumentType } from '../../../documents/DocumentTypes'; -import { SelectionManager } from '../../../util/SelectionManager'; -import { SettingsManager } from '../../../util/SettingsManager'; +import { SnappingManager } from '../../../util/SnappingManager'; import { undoable, UndoManager } from '../../../util/UndoManager'; import { ContextMenu } from '../../ContextMenu'; import { ViewBoxBaseComponent } from '../../DocComponent'; @@ -125,7 +124,7 @@ export class FontIconBox extends ViewBoxBaseComponent() { return ( () { let text: string | undefined; let getStyle: (val: string) => any = () => {}; let icon: IconProp = 'caret-down'; - const isViewDropdown = script?.script.originalScript.startsWith('setView'); + const isViewDropdown = script?.script.originalScript.startsWith('{ return setView'); if (isViewDropdown) { - const selected = SelectionManager.Docs; + const selected = Array.from(script?.script.run({ _readOnly_: true }).result) as Doc[]; + // const selected = SelectionManager.Docs; if (selected.lastElement()) { if (StrCast(selected.lastElement().type) === DocumentType.COL) { text = StrCast(selected.lastElement()._type_collection); @@ -178,15 +178,15 @@ export class FontIconBox extends ViewBoxBaseComponent() { icon={} text={text} type={Type.TERT} - color={SettingsManager.userColor} - background={SettingsManager.userVariantColor} + color={SnappingManager.userColor} + background={SnappingManager.userVariantColor} popup={} fillWidth /> ); } } else { - return