diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java b/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java index dcad154..57ab5d2 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java @@ -282,8 +282,8 @@ List children = resNode.getChildren(); if(children != null) { //List children = resNode.getChildren(); - int i = 1; - int childCount = children.size(); + double i = 1; + double childCount = children.size(); for (Resource childNode: children) { double width, height, maxDiv; ResourcePath childRes ; @@ -300,7 +300,7 @@ Object childResource = graph.insertVertex(resource, null, - childRes.toString(), width * (i - childCount / 2.0), height/2, width, height, + childRes.toString(), width * (i - 1 - (childCount-1) / 2)*childCount, height/2, width, height, "shape=ellipse;perimeter=ellipsePerimeter;verticalAlign=top;"); // insert a resource as a vertex resources.put(childNode, childResource); i++;