mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge a823c5abd4196c52a473dd57ea91ed57532dda27 into 2feb290ae3c6cd88c16e4c27c2006a569e0146e2
This commit is contained in:
commit
aa7e72ba09
@ -3836,7 +3836,9 @@ RED.view = (function() {
|
|||||||
this.parentNode.classList.add("red-ui-flow-node-hovered");
|
this.parentNode.classList.add("red-ui-flow-node-hovered");
|
||||||
}
|
}
|
||||||
clearTimeout(portLabelHoverTimeout);
|
clearTimeout(portLabelHoverTimeout);
|
||||||
if (d.hasOwnProperty('l')?!d.l : (d.type === "link in" || d.type === "link out")) {
|
|
||||||
|
var displayLabel = d.hasOwnProperty('l')?!d.l : (d.type === "link in" || d.type === "link out");
|
||||||
|
if (displayLabel || d.info) {
|
||||||
var parentNode = this.parentNode;
|
var parentNode = this.parentNode;
|
||||||
portLabelHoverTimeout = setTimeout(function() {
|
portLabelHoverTimeout = setTimeout(function() {
|
||||||
//check see if node has been deleted since timeout started
|
//check see if node has been deleted since timeout started
|
||||||
@ -3844,15 +3846,13 @@ RED.view = (function() {
|
|||||||
return; //node is gone!
|
return; //node is gone!
|
||||||
}
|
}
|
||||||
var tooltip;
|
var tooltip;
|
||||||
if (d._def.label) {
|
|
||||||
tooltip = d._def.label;
|
|
||||||
try {
|
try {
|
||||||
tooltip = (typeof tooltip === "function" ? tooltip.call(d) : tooltip)||"";
|
var label = displayLabel ? (typeof d._def.label === "function" ? d._def.label.call(d) : d._def.label)||"" : "";
|
||||||
|
tooltip = `${label ? label : ''}${d.info && label ? ': ': ''}${d.info ? d.info : ''}`;
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log("Definition error: "+d.type+".label",err);
|
console.log("Definition error: "+d.type+".label",err);
|
||||||
tooltip = d.type;
|
tooltip = d.type;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (tooltip !== "") {
|
if (tooltip !== "") {
|
||||||
var pos = getElementPosition(parentNode);
|
var pos = getElementPosition(parentNode);
|
||||||
portLabelHoverTimeout = null;
|
portLabelHoverTimeout = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user