From ff1861803235e55c9bd872f0a4b490fab0cf684f Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 17 Apr 2018 12:44:58 +0100 Subject: [PATCH] Highlight subflow node when log msg comes from inside Fixes #1698 --- nodes/core/core/58-debug.html | 2 +- nodes/core/core/lib/debug/debug-utils.js | 7 +++++++ red/runtime/nodes/Node.js | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/nodes/core/core/58-debug.html b/nodes/core/core/58-debug.html index 7eca4c87b..7317d7064 100644 --- a/nodes/core/core/58-debug.html +++ b/nodes/core/core/58-debug.html @@ -181,7 +181,7 @@ this.handleDebugMessage = function(t,o) { var sourceNode = RED.nodes.node(o.id) || RED.nodes.node(o.z); if (sourceNode) { - o._source = {id:sourceNode.id,z:sourceNode.z,name:sourceNode.name}; + o._source = {id:sourceNode.id,z:sourceNode.z,name:sourceNode.name,type:sourceNode.type,_alias:o._alias}; } RED.debug.handleDebugMessage(o); if (subWindow) { diff --git a/nodes/core/core/lib/debug/debug-utils.js b/nodes/core/core/lib/debug/debug-utils.js index ffb1c53f3..17b850327 100644 --- a/nodes/core/core/lib/debug/debug-utils.js +++ b/nodes/core/core/lib/debug/debug-utils.js @@ -403,12 +403,19 @@ RED.debug = (function() { $(msg).addClass('debug-message-hover'); if (o._source) { config.messageMouseEnter(o._source.id); + if (o._source._alias) { + config.messageMouseEnter(o._source._alias); + } } + }; msg.onmouseleave = function() { $(msg).removeClass('debug-message-hover'); if (o._source) { config.messageMouseLeave(o._source.id); + if (o._source._alias) { + config.messageMouseLeave(o._source._alias); + } } }; var name = sanitize(((o.name?o.name:o.id)||"").toString()); diff --git a/red/runtime/nodes/Node.js b/red/runtime/nodes/Node.js index 2615d7e0f..462b7f3c8 100644 --- a/red/runtime/nodes/Node.js +++ b/red/runtime/nodes/Node.js @@ -222,7 +222,9 @@ function log_helper(self, level, msg) { var o = { level: level, id: self.id, + z: self.z, type: self.type, + _alias: self._alias, msg: msg }; if (self.name) {