From c30e57c31d6b43ca76303b41e70fdd36680a6203 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Sun, 23 Apr 2023 20:47:17 +0900 Subject: [PATCH] Add node width and height to boundingBox --- .../editor-client/src/js/ui/subflow.js | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js index 43e525070..abe6402db 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js @@ -663,24 +663,23 @@ RED.subflow = (function() { var candidateOutputs = []; var candidateInputNodes = {}; - var boundingBox = [nodeList[0].x, - nodeList[0].y, - nodeList[0].x, - nodeList[0].y]; + var boundingBox = [nodeList[0].x-(nodeList[0].w/2), + nodeList[0].y-(nodeList[0].h/2), + nodeList[0].x+(nodeList[0].w/2), + nodeList[0].y+(nodeList[0].h/2)]; for (i=0;i