mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
not emit change event on group delete
This commit is contained in:
parent
c5ca9fafee
commit
05f816fc5d
@ -362,9 +362,6 @@ RED.sidebar.info.outliner = (function() {
|
|||||||
var existingObject = objects[n.id];
|
var existingObject = objects[n.id];
|
||||||
var parent = n.g||n.z;
|
var parent = n.g||n.z;
|
||||||
|
|
||||||
if (!existingObject) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var nodeLabelText = getNodeLabelText(n);
|
var nodeLabelText = getNodeLabelText(n);
|
||||||
if (nodeLabelText) {
|
if (nodeLabelText) {
|
||||||
existingObject.element.find(".red-ui-info-outline-item-label").text(nodeLabelText);
|
existingObject.element.find(".red-ui-info-outline-item-label").text(nodeLabelText);
|
||||||
@ -373,9 +370,7 @@ RED.sidebar.info.outliner = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (parent !== existingObject.parent.id) {
|
if (parent !== existingObject.parent.id) {
|
||||||
if (existingObject.treeList) {
|
|
||||||
existingObject.treeList.remove();
|
existingObject.treeList.remove();
|
||||||
}
|
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
globalConfigNodes.treeList.addChild(existingObject);
|
globalConfigNodes.treeList.addChild(existingObject);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1943,10 +1943,14 @@ if (DEBUG_EVENTS) { console.warn("clearSelection", mouse_mode); }
|
|||||||
if (moving_set.length > 0) {
|
if (moving_set.length > 0) {
|
||||||
for (var i=0;i<moving_set.length;i++) {
|
for (var i=0;i<moving_set.length;i++) {
|
||||||
var node = moving_set[i].n;
|
var node = moving_set[i].n;
|
||||||
node.selected = false;
|
|
||||||
if (node.type === "group") {
|
if (node.type === "group") {
|
||||||
selectedGroups.push(node);
|
selectedGroups.push(node);
|
||||||
} else if (node.type != "subflow") {
|
}
|
||||||
|
}
|
||||||
|
for (var i=0;i<moving_set.length;i++) {
|
||||||
|
var node = moving_set[i].n;
|
||||||
|
node.selected = false;
|
||||||
|
if ((node.type !== "group") && (node.type != "subflow")) {
|
||||||
if (node.x < 0) {
|
if (node.x < 0) {
|
||||||
node.x = 25
|
node.x = 25
|
||||||
}
|
}
|
||||||
@ -1957,10 +1961,15 @@ if (DEBUG_EVENTS) { console.warn("clearSelection", mouse_mode); }
|
|||||||
if (node.g) {
|
if (node.g) {
|
||||||
var group = RED.nodes.group(node.g);
|
var group = RED.nodes.group(node.g);
|
||||||
if (!group.selected || group.active) {
|
if (!group.selected || group.active) {
|
||||||
|
var isSelectedGroup = selectedGroups.find(function (ng) {
|
||||||
|
return (ng.id === node.g);
|
||||||
|
});
|
||||||
|
if (!isSelectedGroup) {
|
||||||
RED.group.removeFromGroup(group,node);
|
RED.group.removeFromGroup(group,node);
|
||||||
node.g = group.id;
|
node.g = group.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (node.direction === "out") {
|
if (node.direction === "out") {
|
||||||
removedSubflowOutputs.push(node);
|
removedSubflowOutputs.push(node);
|
||||||
|
Loading…
Reference in New Issue
Block a user