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

Don't assume def.align is set to 'right'

Fixes #734
This commit is contained in:
Nick O'Leary 2015-10-15 14:26:43 +01:00
parent 0343de9f34
commit 741a4cfe53

View File

@ -1359,8 +1359,10 @@ RED.view = (function() {
var text = node.append('svg:text').attr('class','node_label').attr('x', 38).attr('dy', '.35em').attr('text-anchor','start'); var text = node.append('svg:text').attr('class','node_label').attr('x', 38).attr('dy', '.35em').attr('text-anchor','start');
if (d._def.align) { if (d._def.align) {
text.attr('class','node_label node_label_'+d._def.align); text.attr('class','node_label node_label_'+d._def.align);
if (d._def.align === "right") {
text.attr('text-anchor','end'); text.attr('text-anchor','end');
} }
}
var status = node.append("svg:g").attr("class","node_status_group").style("display","none"); var status = node.append("svg:g").attr("class","node_status_group").style("display","none");