diff options
author | bobzel <zzzman@gmail.com> | 2022-06-03 08:39:14 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-06-03 08:39:14 -0400 |
commit | 3e75896a0c6e59036a6b9467521f4fe68fdda1a0 (patch) | |
tree | 758cfb37a9a17d4b276f7bcc908a56185b718978 /src/client/views/nodes/button/ButtonScripts.ts | |
parent | ca26b43095622d07ae81fc08d4037be38d9a8b28 (diff) | |
parent | 8799738abd11a878579814e64163e0f8a95b5116 (diff) |
Merge branch 'master' into presentation_upgrade
Diffstat (limited to 'src/client/views/nodes/button/ButtonScripts.ts')
-rw-r--r-- | src/client/views/nodes/button/ButtonScripts.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/button/ButtonScripts.ts b/src/client/views/nodes/button/ButtonScripts.ts index f3731b8f9..b4a382faf 100644 --- a/src/client/views/nodes/button/ButtonScripts.ts +++ b/src/client/views/nodes/button/ButtonScripts.ts @@ -1,5 +1,6 @@ import { ScriptingGlobals } from "../../../util/ScriptingGlobals"; import { SelectionManager } from "../../../util/SelectionManager"; +import { Colors } from "../../global/globalEnums"; // toggle: Set overlay status of selected document ScriptingGlobals.add(function changeView(view: string) { @@ -8,7 +9,8 @@ ScriptingGlobals.add(function changeView(view: string) { }); // toggle: Set overlay status of selected document -ScriptingGlobals.add(function toggleOverlay() { +ScriptingGlobals.add(function toggleOverlay(readOnly?: boolean) { const selected = SelectionManager.Views().length ? SelectionManager.Views()[0] : undefined; + if (readOnly) return selected?.Document.z ? Colors.MEDIUM_BLUE : "transparent"; selected ? selected.props.CollectionFreeFormDocumentView?.().float() : console.log("failed"); });
\ No newline at end of file |