From 3389c8160be3a9ff289047e8eb91deaa19894635 Mon Sep 17 00:00:00 2001
From: Nick O'Leary <nick.oleary@gmail.com>
Date: Tue, 14 May 2024 13:51:52 +0100
Subject: [PATCH] Handle group w/h properties as move rather than change

---
 .../@node-red/editor-client/src/js/ui/diff.js             | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js
index bc874b9de..ebdf683e3 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js
@@ -1203,7 +1203,9 @@ RED.diff = (function() {
                     moved[id] = true;
                 } else if (
                     currentConfig.all[id].x !== newConfig.all[id].x ||
-                    currentConfig.all[id].y !== newConfig.all[id].y
+                    currentConfig.all[id].y !== newConfig.all[id].y ||
+                    currentConfig.all[id].w !== newConfig.all[id].w ||
+                    currentConfig.all[id].h !== newConfig.all[id].h
                 ) {
                     // This node's position on its parent has changed. We want to
                     // check if this is the *only* change for this given node
@@ -1212,8 +1214,12 @@ RED.diff = (function() {
 
                     delete currentNodeClone.x
                     delete currentNodeClone.y
+                    delete currentNodeClone.w
+                    delete currentNodeClone.h
                     delete newNodeClone.x
                     delete newNodeClone.y
+                    delete newNodeClone.w
+                    delete newNodeClone.h
                     
                     if (JSON.stringify(currentNodeClone) === JSON.stringify(newNodeClone)) {
                         // Only the position has changed - everything else is the same