From fc0409fc2996d7666c48bbd8abf5c530262c39ae Mon Sep 17 00:00:00 2001 From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> Date: Tue, 18 Jul 2023 13:30:04 -0400 Subject: fixed button click issues and made it such that when you have no documents selected, then irrelevant buttons wont show --- src/client/views/global/globalScripts.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/client/views/global') 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(); -- cgit v1.2.3-70-g09d2