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