From 893a7cb517490ad5fc1f4737ff610779a57fdee7 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 17 Sep 2024 20:43:16 -0400 Subject: cleaning up card view stuff post-merge --- src/client/views/global/globalScripts.ts | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src/client/views/global') diff --git a/src/client/views/global/globalScripts.ts b/src/client/views/global/globalScripts.ts index 65bd524fe..99bd537b1 100644 --- a/src/client/views/global/globalScripts.ts +++ b/src/client/views/global/globalScripts.ts @@ -283,23 +283,21 @@ ScriptingGlobals.add(function handleTags(value?: any, checkResult?: boolean) { return StrListCast(selected._childFilters).some(filter => filter.includes(attr)); } - if (checkResult) { - return value=== 'opts' ? PropertiesView.Instance?.openFilters : isAttrFiltered(value) - } + if (checkResult) { + return value === 'opts' ? PropertiesView.Instance?.openFilters : isAttrFiltered(value); + } - if (value != 'opts'){ - isAttrFiltered(value) ? Doc.setDocFilter(selected, value, true, 'remove') : Doc.setDocFilter(selected, value, true, 'match'); - } - else { - SnappingManager.PropertiesWidth < 5 && SnappingManager.SetPropertiesWidth(0); - SnappingManager.SetPropertiesWidth(MainView.Instance.propertiesWidth() < 15 ? Math.min(MainView.Instance._dashUIWidth - 50, 250) : 0); - PropertiesView.Instance?.CloseAll() - PropertiesView.Instance.openFilters = true - } + if (value != 'opts') { + isAttrFiltered(value) ? Doc.setDocFilter(selected, value, true, 'remove') : Doc.setDocFilter(selected, value, true, 'match'); + } else { + SnappingManager.PropertiesWidth < 5 && SnappingManager.SetPropertiesWidth(0); + SnappingManager.SetPropertiesWidth(MainView.Instance.propertiesWidth() < 15 ? 250 : 0); + PropertiesView.Instance?.CloseAll(); + PropertiesView.Instance.openFilters = true; + } - - return undefined; - }, ''); + return undefined; +}, ''); // eslint-disable-next-line prefer-arrow-callback ScriptingGlobals.add(function setFontAttr(attr: 'font' | 'fontColor' | 'highlight' | 'fontSize' | 'alignment', value: string | number, checkResult?: boolean) { -- cgit v1.2.3-70-g09d2