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);
|
clearTimeout(portLabelHoverTimeout);
|
||||||
|
|
||||||
var displayLabel = 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._def.tooltip) {
|
if (displayLabel || d.info) {
|
||||||
var parentNode = this.parentNode;
|
var parentNode = this.parentNode;
|
||||||
portLabelHoverTimeout = setTimeout(function() {
|
portLabelHoverTimeout = setTimeout(function() {
|
||||||
var tooltip;
|
var tooltip;
|
||||||
try {
|
try {
|
||||||
if (d._def.tooltip) {
|
var label = displayLabel ? (typeof d._def.label === "function" ? d._def.label.call(d) : d._def.label)||"" : "";
|
||||||
tooltip = d._def.tooltip;
|
tooltip = `${label ? label : ''}${d.info && label ? ': ': ''}${d.info ? d.info : ''}`;
|
||||||
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)||"";
|
|
||||||
}
|
|
||||||
} 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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user