Fixed the painting other shapes instead the circle.

This commit is contained in:
mdtrooper 2016-04-11 16:18:46 +02:00
parent 0142f609df
commit 74805b0862
1 changed files with 3 additions and 2 deletions

View File

@ -516,7 +516,7 @@ NetworkmapController.prototype.paint_node = function(g_node, node) {
.attr("data-status_color", node['color']);
switch (node['shape']) {
case 'rect':
case 'square':
d3_node.append("rect")
.attr("height", node['height'])
.attr("width", node['width'])
@ -532,7 +532,8 @@ NetworkmapController.prototype.paint_node = function(g_node, node) {
break;
case 'rhombus':
d3_node.append("rect")
.attr("transform", "rotate(45)")
.attr("transform",
"rotate(45 " + (node['width'] / 2) + " " + (node['height'] / 2) + " )")
.attr("height", node['height'])
.attr("width", node['width'])
.attr("x", 0)