1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Line-up view tooltip text (again) having fixed size calculation

This commit is contained in:
Nick O'Leary 2019-05-22 00:10:55 +01:00
parent 97f11e38cd
commit 8bdba9178a
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -2075,7 +2075,7 @@ RED.view = (function() {
var labelHeight2 = labelHeight - 4; var labelHeight2 = labelHeight - 4;
var path; var path;
var lx; var lx;
var ly = -labelHeight/2+3; var ly = -labelHeight/2;
var anchor; var anchor;
if (direction === "left") { if (direction === "left") {
path = "M0 0 l -5 -5 v -"+(labelHeight1)+" q 0 -2 -2 -2 h -"+labelWidth+" q -2 0 -2 2 v "+(labelHeight2)+" q 0 2 2 2 h "+labelWidth+" q 2 0 2 -2 v -"+(labelHeight1)+" l 5 -5"; path = "M0 0 l -5 -5 v -"+(labelHeight1)+" q 0 -2 -2 -2 h -"+labelWidth+" q -2 0 -2 2 v "+(labelHeight2)+" q 0 2 2 2 h "+labelWidth+" q 2 0 2 -2 v -"+(labelHeight1)+" l 5 -5";
@ -2088,7 +2088,7 @@ RED.view = (function() {
} else if (direction === "top") { } else if (direction === "top") {
path = "M0 0 l 5 -5 h "+(labelWidth1)+" q 2 0 2 -2 v -"+labelHeight+" q 0 -2 -2 -2 h -"+(labelWidth2)+" q -2 0 -2 2 v "+labelHeight+" q 0 2 2 2 h "+(labelWidth1)+" l 5 5" path = "M0 0 l 5 -5 h "+(labelWidth1)+" q 2 0 2 -2 v -"+labelHeight+" q 0 -2 -2 -2 h -"+(labelWidth2)+" q -2 0 -2 2 v "+labelHeight+" q 0 2 2 2 h "+(labelWidth1)+" l 5 5"
lx = -labelWidth/2 + 6; lx = -labelWidth/2 + 6;
ly = -labelHeight-lineHeight+10; ly = -labelHeight-lineHeight+12;
anchor = "start"; anchor = "start";
} }
tooltip.append("path").attr("d",path); tooltip.append("path").attr("d",path);