From d5e35f4cfc6de09fa8d04cac18c576033c74ea20 Mon Sep 17 00:00:00 2001 From: Dariusz L Date: Tue, 24 Jun 2025 19:07:19 +0200 Subject: [PATCH] Adjust editor button size and disable during modal Increased the 'Open in Editor' button width from 30px to 40px for better visibility. The button is now disabled when the modal is open and re-enabled when the modal is closed to prevent multiple modal instances. --- js/Canvas_view.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/Canvas_view.js b/js/Canvas_view.js index 5afbb04..d9657c9 100644 --- a/js/Canvas_view.js +++ b/js/Canvas_view.js @@ -324,7 +324,7 @@ async function createCanvasWidget(node, widget, app) { id: `open-editor-btn-${node.id}`, textContent: "⛶", title: "Open in Editor", - style: { minWidth: "30px", maxWidth: "30px", fontWeight: "bold" }, + style: { minWidth: "40px", maxWidth: "40px", fontWeight: "bold" }, }), $el("button.painter-button", { textContent: "?", @@ -682,6 +682,7 @@ async function createCanvasWidget(node, widget, app) { modalContent.appendChild(mainContainer); backdrop.appendChild(modalContent); document.body.appendChild(backdrop); + openEditorBtn.disabled = true; canvas.render(); if (node.onResize) { @@ -694,6 +695,7 @@ async function createCanvasWidget(node, widget, app) { onclick: () => { originalParent.appendChild(mainContainer); document.body.removeChild(backdrop); + openEditorBtn.disabled = false; canvas.render(); if (node.onResize) { node.onResize();