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,6 +285,7 @@
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()) {
if(RED.nodes.subflow(n.z) === undefined) {
historyEvents.push({ historyEvents.push({
t: "edit", t: "edit",
node: n, node: n,
@ -291,7 +293,7 @@
changes: { changes: {
active: n.active active: n.active
}, },
sideEffectCallback: function() { callback: function() {
activateAjaxCall(n, n.active); activateAjaxCall(n, n.active);
} }
}); });
@ -301,6 +303,7 @@
activateAjaxCall(n, n.active); activateAjaxCall(n, n.active);
} }
} }
}
}); });
if (historyEvents.length > 0) { if (historyEvents.length > 0) {
RED.history.push({ RED.history.push({