diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2023-07-18 13:30:04 -0400 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2023-07-18 13:30:04 -0400 |
commit | fc0409fc2996d7666c48bbd8abf5c530262c39ae (patch) | |
tree | 48ebc66153a29d305aeb0222adae04ed7b914d7d /src/client/views/global/globalScripts.ts | |
parent | b62a751b6a16acd28b4f9a9794ded6ea14fa0de8 (diff) |
fixed button click issues
and made it such that when you have no documents selected, then irrelevant buttons wont show
Diffstat (limited to 'src/client/views/global/globalScripts.ts')
-rw-r--r-- | src/client/views/global/globalScripts.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/global/globalScripts.ts b/src/client/views/global/globalScripts.ts index d22b6b4d9..b906065a0 100644 --- a/src/client/views/global/globalScripts.ts +++ b/src/client/views/global/globalScripts.ts @@ -20,6 +20,8 @@ import { WebBox } from "../nodes/WebBox"; import { RichTextMenu } from "../nodes/formattedText/RichTextMenu"; import { DocumentType } from "../../documents/DocumentTypes"; +ScriptingGlobals.add(function IsNoneSelected() { return SelectionManager.Views().length <= 0; }, "are no document selected"); + // toggle: Set overlay status of selected document ScriptingGlobals.add(function setView(view: string) { const selected = SelectionManager.Docs().lastElement(); |