From 30a0dcef42be95fc339dfe5c4b23517aeaa61943 Mon Sep 17 00:00:00 2001 From: Alexander Vogt Date: Wed, 25 Jun 2025 12:53:41 +0200 Subject: [PATCH] add embed mode --- src/common/commonStyling.css | 4 ++++ src/common/helpUi.ts | 2 +- src/features/constraintMenu/ConstraintMenu.ts | 6 +++--- src/features/constraintMenu/constraintMenu.css | 10 ++++++++++ src/features/dfdElements/nodeAnnotationUi.ts | 2 +- src/features/editorMode/editorModeController.ts | 2 +- src/features/editorMode/modeSwitchUi.ts | 3 ++- src/features/labels/labelTypeEditor.ts | 2 +- src/features/settingsMenu/settingsMenu.ts | 2 +- src/features/toolPalette/toolPalette.tsx | 2 +- src/index.ts | 9 +++++++++ 11 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/common/commonStyling.css b/src/common/commonStyling.css index b121db8..d6ad5a9 100644 --- a/src/common/commonStyling.css +++ b/src/common/commonStyling.css @@ -4,6 +4,10 @@ background-color: var(--color-primary); } +.embed-mode .hide-on-embed { + display: none; +} + /* Styling for keyboard symbols. Copied from the example at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd with adapted colors */ diff --git a/src/common/helpUi.ts b/src/common/helpUi.ts index 839b012..8b4ee25 100644 --- a/src/common/helpUi.ts +++ b/src/common/helpUi.ts @@ -16,7 +16,7 @@ export class HelpUI extends AbstractUIExtension { } protected initializeContents(containerElement: HTMLElement): void { - containerElement.classList.add("ui-float"); + containerElement.classList.add("ui-float", "hide-on-embed"); containerElement.innerHTML = `