mirror of https://github.com/node-red/node-red.git
Handle group w/h properties as move rather than change
parent
c214710f8e
commit
3389c8160b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue