diff --git a/ihmc-high-level-behaviors/src/main/java/us/ihmc/behaviors/behaviorTree/BehaviorTreeSVGWriter.java b/ihmc-high-level-behaviors/src/main/java/us/ihmc/behaviors/behaviorTree/BehaviorTreeSVGWriter.java index 18975b76c97..c03323c78c4 100644 --- a/ihmc-high-level-behaviors/src/main/java/us/ihmc/behaviors/behaviorTree/BehaviorTreeSVGWriter.java +++ b/ihmc-high-level-behaviors/src/main/java/us/ihmc/behaviors/behaviorTree/BehaviorTreeSVGWriter.java @@ -15,6 +15,7 @@ public class BehaviorTreeSVGWriter private int i = 0; private int x = 100; private int y = 100; + private int actionSequenceIndex = 0; private int actionSequenceX = x; private int actionSequenceY = y; private final ArrayList svgNodes = new ArrayList<>(); @@ -29,16 +30,23 @@ public BehaviorTreeSVGWriter(BehaviorTreeNodeState node) { if (child instanceof ActionSequenceState) { + actionSequenceIndex = i; actionSequenceX = x; actionSequenceY = y; } + if (child.getDefinition().getName().equals("Set static for approach")) + { + + } + + BehaviorTreeSVGNode svgNode = new BehaviorTreeSVGNode(svgGraphics2D, child, svgNodes, i, x, y); svgNodes.add(svgNode); y += svgNode.getHeight(); - if (svgNodes.size() % 12 == 0) + if ((svgNodes.size() - (actionSequenceIndex + 1)) % 12 == 0) y = actionSequenceY + 30; ++i;