mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
info instead of tooltip
This commit is contained in:
parent
5494b06311
commit
5e23920c43
@ -3663,19 +3663,13 @@ RED.view = (function() {
|
||||
clearTimeout(portLabelHoverTimeout);
|
||||
|
||||
var displayLabel = d.hasOwnProperty('l')?!d.l : (d.type === "link in" || d.type === "link out");
|
||||
if (displayLabel || d._def.tooltip) {
|
||||
if (displayLabel || d.info) {
|
||||
var parentNode = this.parentNode;
|
||||
portLabelHoverTimeout = setTimeout(function() {
|
||||
var tooltip;
|
||||
try {
|
||||
if (d._def.tooltip) {
|
||||
tooltip = d._def.tooltip;
|
||||
tooltip = (typeof tooltip === "function" ? tooltip.call(d) : tooltip)||"";
|
||||
}
|
||||
if (displayLabel && d._def.label && !tooltip){
|
||||
tooltip = d._def.label;
|
||||
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) {
|
||||
console.log("Definition error: "+d.type+".label",err);
|
||||
tooltip = d.type;
|
||||
|
Loading…
Reference in New Issue
Block a user