Skip to content

Commit

Permalink
fix bugs in sugiyama
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorBlock committed Feb 1, 2019
1 parent 41fa151 commit ceaf501
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 281 deletions.
13 changes: 6 additions & 7 deletions graphview/src/main/java/de/blox/graphview/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Node {
public Node(Object data) {
this.data = data;
setPos(new Vector());
size = new Size(0,0);
size = new Size(0, 0);
}

public Vector getPosition() {
Expand Down Expand Up @@ -57,12 +57,11 @@ public int getHeight() {

@Override
public String toString() {
// return "Node{" +
// "pos=" + pos +
// ", data=" + data +
// ", size=" + size +
// '}';
return data+"";
return "Node{" +
"pos=" + pos +
", data=" + data +
", size=" + size +
'}';
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public void render(Canvas canvas, Graph graph, Paint paint) {
final Node destination = edge.getDestination();
final Vector destinationPosition = destination.getPosition();

canvas.drawLine((float) sourcePosition.getX() + source.getWidth() / 2f,
(float) sourcePosition.getY() + source.getHeight() / 2f,
(float) destinationPosition.getX() + destination.getWidth() / 2f,
(float) destinationPosition.getY() + destination.getHeight() / 2f, paint);
canvas.drawLine(sourcePosition.getX() + source.getWidth() / 2f,
sourcePosition.getY() + source.getHeight() / 2f,
destinationPosition.getX() + destination.getWidth() / 2f,
destinationPosition.getY() + destination.getHeight() / 2f, paint);
}
}
}

This file was deleted.

Loading

0 comments on commit ceaf501

Please sign in to comment.