mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix error on empty label
This commit is contained in:
parent
243915516e
commit
5f5e6ea845
@ -4287,16 +4287,18 @@ if (DEBUG_EVENTS) { console.warn("nodeMouseDown", mouse_mode,d); }
|
||||
.style("fill", d.style.hasOwnProperty('color')?d.style.color:"#999")
|
||||
.attr("transform","translate("+labelX+","+labelY+")")
|
||||
.attr("text-anchor",labelAnchor);
|
||||
var ypos = 0;
|
||||
g.selectAll(".red-ui-flow-group-label-text").remove();
|
||||
d.labels.forEach(function (name) {
|
||||
label.append("tspan")
|
||||
.classed("red-ui-flow-group-label-text", true)
|
||||
.text(name)
|
||||
.attr("x", 0)
|
||||
.attr("y", ypos);
|
||||
ypos += 15;
|
||||
});
|
||||
if (d.labels) {
|
||||
var ypos = 0;
|
||||
g.selectAll(".red-ui-flow-group-label-text").remove();
|
||||
d.labels.forEach(function (name) {
|
||||
label.append("tspan")
|
||||
.classed("red-ui-flow-group-label-text", true)
|
||||
.text(name)
|
||||
.attr("x", 0)
|
||||
.attr("y", ypos);
|
||||
ypos += 15;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
delete dirtyGroups[d.id];
|
||||
|
Loading…
Reference in New Issue
Block a user