diff options
author | bobzel <zzzman@gmail.com> | 2022-06-05 21:12:49 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-06-05 21:12:49 -0400 |
commit | 716dd83325074aa2016e3993ff13c6f7001dc3df (patch) | |
tree | 2ba67e34a1ff6ce38f9199914ee4a8da769afa1e /src/client/views/nodes/button/ButtonScripts.ts | |
parent | b51b78c641c3e64f04cf878f02b5d7b1a620769e (diff) | |
parent | 0371242941dfdd1d689d0097140b203bb0b24dea (diff) |
merged with master and added transcription icon view for recognized ink
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 |