From d0020da3bf9648ee5f4163bbfae662616e6ed66c Mon Sep 17 00:00:00 2001 From: Thea Flowers Date: Tue, 17 Oct 2023 23:20:28 -0400 Subject: [PATCH] Add focus-overlay to kicanvas-embed --- debug/embedded.html | 5 +---- src/kicanvas/elements/kicanvas-embed.ts | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/debug/embedded.html b/debug/embedded.html index 734f466a..90a1d7e9 100644 --- a/debug/embedded.html +++ b/debug/embedded.html @@ -15,10 +15,7 @@ nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

- +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do diff --git a/src/kicanvas/elements/kicanvas-embed.ts b/src/kicanvas/elements/kicanvas-embed.ts index c2ce45ac..0eecde55 100644 --- a/src/kicanvas/elements/kicanvas-embed.ts +++ b/src/kicanvas/elements/kicanvas-embed.ts @@ -19,8 +19,6 @@ import { FetchFileSystem, VirtualFileSystem } from "../services/vfs"; import type { KCBoardAppElement } from "./kc-board/app"; import type { KCSchematicAppElement } from "./kc-schematic/app"; -import "../../kc-ui/floating-toolbar"; - /** * */ @@ -38,9 +36,12 @@ class KiCanvasEmbedElement extends KCUIElement { aspect-ratio: 1.414; background-color: aqua; color: var(--fg); + font-family: "Nunito", ui-rounded, "Hiragino Maru Gothic ProN", + Quicksand, Comfortaa, Manjari, "Arial Rounded MT Bold", + Calibri, source-sans-pro, sans-serif; } - :host main { + main { display: contents; } @@ -154,7 +155,14 @@ class KiCanvasEmbedElement extends KCUIElement { ` as KCBoardAppElement; } - return html`

${this.#schematic_app} ${this.#board_app}
`; + const focus_overlay = + this.controls == "none" || this.controlslist?.includes("nooverlay") + ? null + : html``; + + return html`
+ ${this.#schematic_app} ${this.#board_app} ${focus_overlay} +
`; } }