From b68d79b5f832ba92ff032dce4c8488c06ec2a0a2 Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 16 Dec 2025 12:52:17 -0500 Subject: [PATCH] Lock BG compositor 4 --- web/compositor3.js | 2 +- web/compositor4.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/compositor3.js b/web/compositor3.js index 8db1eff..a343547 100644 --- a/web/compositor3.js +++ b/web/compositor3.js @@ -9,7 +9,7 @@ function isCompositor3(node) { } function isCompositorConfig3(node) { - return node.constructor.comfyClass == "CompositorConfig3"; + return node.constructor.comfyClass == "CompositorConfig3-beyond_nodes"; } function getCompositorWidget(node, widgetName) { diff --git a/web/compositor4.js b/web/compositor4.js index 8c28f35..2f5ce5d 100644 --- a/web/compositor4.js +++ b/web/compositor4.js @@ -2864,10 +2864,10 @@ const Editor = (node, fabric) => { // Update composition border if (compositionBorder) { compositionBorder.set({ - left: p - COMPOSITION_BORDER_SIZE, - top: p - COMPOSITION_BORDER_SIZE, - width: w + COMPOSITION_BORDER_SIZE * 2, - height: h + COMPOSITION_BORDER_SIZE * 2, + left: p + COMPOSITION_BORDER_SIZE - COMPOSITION_BORDER_SIZE / 2, + top: p + COMPOSITION_BORDER_SIZE - COMPOSITION_BORDER_SIZE / 2, + width: w + COMPOSITION_BORDER_SIZE, + height: h + COMPOSITION_BORDER_SIZE, }); } @@ -4411,10 +4411,10 @@ const Editor = (node, fabric) => { // Update composition border compositionBorder.set({ - left: canvasPadding - COMPOSITION_BORDER_SIZE, - top: canvasPadding - COMPOSITION_BORDER_SIZE, - width: canvasWidth + COMPOSITION_BORDER_SIZE * 2, - height: canvasHeight + COMPOSITION_BORDER_SIZE * 2, + left: canvasPadding + COMPOSITION_BORDER_SIZE - COMPOSITION_BORDER_SIZE / 2, + top: canvasPadding + COMPOSITION_BORDER_SIZE - COMPOSITION_BORDER_SIZE / 2, + width: canvasWidth + COMPOSITION_BORDER_SIZE, + height: canvasHeight + COMPOSITION_BORDER_SIZE, }); // Update container size