Fixed the painting other shapes instead the circle.
This commit is contained in:
parent
0142f609df
commit
74805b0862
|
@ -516,7 +516,7 @@ NetworkmapController.prototype.paint_node = function(g_node, node) {
|
||||||
.attr("data-status_color", node['color']);
|
.attr("data-status_color", node['color']);
|
||||||
|
|
||||||
switch (node['shape']) {
|
switch (node['shape']) {
|
||||||
case 'rect':
|
case 'square':
|
||||||
d3_node.append("rect")
|
d3_node.append("rect")
|
||||||
.attr("height", node['height'])
|
.attr("height", node['height'])
|
||||||
.attr("width", node['width'])
|
.attr("width", node['width'])
|
||||||
|
@ -532,7 +532,8 @@ NetworkmapController.prototype.paint_node = function(g_node, node) {
|
||||||
break;
|
break;
|
||||||
case 'rhombus':
|
case 'rhombus':
|
||||||
d3_node.append("rect")
|
d3_node.append("rect")
|
||||||
.attr("transform", "rotate(45)")
|
.attr("transform",
|
||||||
|
"rotate(45 " + (node['width'] / 2) + " " + (node['height'] / 2) + " )")
|
||||||
.attr("height", node['height'])
|
.attr("height", node['height'])
|
||||||
.attr("width", node['width'])
|
.attr("width", node['width'])
|
||||||
.attr("x", 0)
|
.attr("x", 0)
|
||||||
|
|
Loading…
Reference in New Issue