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.
This commit is contained in:
Dariusz L
2025-06-24 19:07:19 +02:00
parent 04d3531bf5
commit d5e35f4cfc

View File

@@ -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();