1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

fix undo handling & typo

This commit is contained in:
Hiroyasu Nishiyama 2019-07-30 11:07:55 +09:00
parent 86928bbb2d
commit cbce9b8637
2 changed files with 3 additions and 1 deletions

View File

@ -276,11 +276,13 @@ RED.history = (function() {
ev.node.changed = ev.changed; ev.node.changed = ev.changed;
} else if (ev.t == "createSubflow") { } else if (ev.t == "createSubflow") {
if (ev.nodes) { if (ev.nodes) {
var z = ev.activeWorkspace;
RED.nodes.filterNodes({z:ev.subflow.subflow.id}).forEach(function(n) { RED.nodes.filterNodes({z:ev.subflow.subflow.id}).forEach(function(n) {
n.x += ev.subflow.offsetX; n.x += ev.subflow.offsetX;
n.y += ev.subflow.offsetY; n.y += ev.subflow.offsetY;
n.z = ev.activeWorkspace; n.z = ev.activeWorkspace;
n.dirty = true; n.dirty = true;
RED.nodes.moveNodeToTab(n, z);
}); });
for (i=0;i<ev.nodes.length;i++) { for (i=0;i<ev.nodes.length;i++) {
RED.nodes.remove(ev.nodes[i]); RED.nodes.remove(ev.nodes[i]);

View File

@ -308,7 +308,7 @@ RED.nodes = (function() {
if (!nodeTabMap[z]) { if (!nodeTabMap[z]) {
nodeTabMap[z] = {}; nodeTabMap[z] = {};
} }
nodeTabMap[z][node.iz] = node; nodeTabMap[z][node.id] = node;
node.z = z; node.z = z;
} }