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

Fix clearing group label

This commit is contained in:
Nick O'Leary 2020-06-18 22:25:00 +01:00
parent 19ffe8f308
commit 6f407750f5
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -4267,10 +4267,11 @@ RED.view = (function() {
d.labels = labelParts.lines; d.labels = labelParts.lines;
} else { } else {
d.minWidth = 40; d.minWidth = 40;
d.labels = [];
} }
} }
d.w = Math.max(d.minWidth,d.w); d.w = Math.max(d.minWidth,d.w);
if (d.style.label && d.labels) { if (d.style.label && d.labels.length > 1) {
var h = (d.labels.length-1) * 16; var h = (d.labels.length-1) * 16;
var labelPos = d.style["label-position"] || "nw"; var labelPos = d.style["label-position"] || "nw";
d.h += h; d.h += h;
@ -4357,6 +4358,8 @@ RED.view = (function() {
.attr("y", ypos); .attr("y", ypos);
ypos += 16; ypos += 16;
}); });
} else {
g.selectAll(".red-ui-flow-group-label-text").remove();
} }
} }