mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user