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

debug nodes in subflows are ignored and changed name of callback to callback

This commit is contained in:
cinhcet 2020-05-19 18:00:03 +02:00
parent a6a781f67c
commit 64b3c11682
2 changed files with 22 additions and 19 deletions

View File

@ -452,9 +452,9 @@ RED.history = (function() {
} }
} }
if(ev.sideEffectCallback && typeof ev.sideEffectCallback === 'function') { if(ev.callback && typeof ev.callback === 'function') {
inverseEv.sideEffectCallback = ev.sideEffectCallback; inverseEv.callback = ev.callback;
ev.sideEffectCallback(ev); ev.callback(ev);
} }
Object.keys(modifiedTabs).forEach(function(id) { Object.keys(modifiedTabs).forEach(function(id) {

View File

@ -101,7 +101,7 @@
}, },
dirty:node.dirty, dirty:node.dirty,
changed:node.changed, changed:node.changed,
sideEffectCallback: function(ev) { callback: function(ev) {
activateAjaxCall(ev.node, ev.node.active); activateAjaxCall(ev.node, ev.node.active);
} }
}; };
@ -119,6 +119,7 @@
} }
}, },
onpaletteadd: function() { onpaletteadd: function() {
console.log(RED);
var options = { var options = {
messageMouseEnter: function(sourceId) { messageMouseEnter: function(sourceId) {
if (sourceId) { if (sourceId) {
@ -284,21 +285,23 @@
RED.nodes.eachNode(function(n) { RED.nodes.eachNode(function(n) {
if (n.type === "debug" && n.active === true) { if (n.type === "debug" && n.active === true) {
if (globally === true || n.z == RED.workspaces.active()) { if (globally === true || n.z == RED.workspaces.active()) {
historyEvents.push({ if(RED.nodes.subflow(n.z) === undefined) {
t: "edit", historyEvents.push({
node: n, t: "edit",
changed: n.changed, node: n,
changes: { changed: n.changed,
active: n.active changes: {
}, active: n.active
sideEffectCallback: function() { },
activateAjaxCall(n, n.active); callback: function() {
} activateAjaxCall(n, n.active);
}); }
n.active = false; });
n.changed = true; n.active = false;
n.dirty = true; n.changed = true;
activateAjaxCall(n, n.active); n.dirty = true;
activateAjaxCall(n, n.active);
}
} }
} }
}); });