mirror of https://github.com/node-red/node-red.git
Outliner - add empty item when last config node moved
parent
209c5f337c
commit
4c98db2269
|
@ -427,6 +427,10 @@ RED.sidebar.info.outliner = (function() {
|
||||||
} else {
|
} else {
|
||||||
delete configNodeTypes[parentItem.parent.parent.id];
|
delete configNodeTypes[parentItem.parent.parent.id];
|
||||||
parentItem.parent.treeList.remove();
|
parentItem.parent.treeList.remove();
|
||||||
|
if (parentItem.parent.parent.children.length === 0) {
|
||||||
|
parentItem.parent.parent.treeList.addChild(getEmptyItem(parentItem.parent.parent.id));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -494,6 +498,9 @@ RED.sidebar.info.outliner = (function() {
|
||||||
} else {
|
} else {
|
||||||
delete configNodeTypes[n.z];
|
delete configNodeTypes[n.z];
|
||||||
parent.parent.treeList.remove();
|
parent.parent.treeList.remove();
|
||||||
|
if (parent.parent.parent.children.length === 0) {
|
||||||
|
parent.parent.parent.treeList.addChild(getEmptyItem(parent.parent.parent.id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue