Commit 5bb6e0af authored by maxchaza's avatar maxchaza
Browse files

Merge branch 'hotfix/init_label'

parents 0104f3d1 ca86a45d
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
/** /**
* The version of the application. * The version of the application.
*/ */
"version": "3.0.16", "version": "3.0.17",
/** /**
* The relative path to the application's markup file (html, jsp, asp, etc.). * The relative path to the application's markup file (html, jsp, asp, etc.).
......
...@@ -160,26 +160,26 @@ d3.selection.prototype.addNodeText = function(style) { ...@@ -160,26 +160,26 @@ d3.selection.prototype.addNodeText = function(style) {
var name = style.getDisplayLabel(d, style.getLabel(), style.isUseAlias()); var name = style.getDisplayLabel(d, style.getLabel(), style.isUseAlias());
name = name.split(' '); name = name.split(' ');
el.text(''); el.text('');
if(style.getLabel()!=="hidden") {
for (var i = 0; i < name.length; i++) { for (var i = 0; i < name.length; i++) {
var nameDOMFormat = $("<div/>").html(name[i]).text(); var nameDOMFormat = $("<div/>").html(name[i]).text();
var tspan = el.append('tspan').text(nameDOMFormat); var tspan = el.append('tspan').text(nameDOMFormat);
if (d.labelFont){ if (d.labelFont) {
if (d.labelFont.fontX) { if (d.labelFont.fontX) {
tspan tspan
.attr('x', function () { .attr('x', function () {
return d.labelFont.fontX; return d.labelFont.fontX;
}); });
} } else tspan.attr('x', 0);
else tspan.attr('x', 0); } else tspan.attr('x', 0);
}
else tspan.attr('x', 0);
if (i > 0){ if (i > 0) {
tspan.attr('dy', style.getFontSize()); tspan.attr('dy', style.getFontSize());
} }
} }
}
}) })
.style("paint-order","stroke") .style("paint-order","stroke")
.style("stroke-width", 1) .style("stroke-width", 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment