Skip to content

Commit 321e47e

Browse files
committed
fix(visualizer): vertically connected nodes now connect properly
#29
1 parent b3dd08f commit 321e47e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Assets/com.fluid.behavior-tree/Editor/BehaviorTree/Printer/NodePrintController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ private void PaintDivider () {
9898
}
9999

100100
var position = new Rect(
101-
_divider.GlobalPositionX + _box.PaddingY / 2 + _node.DividerLeftOffset - 2,
102-
// @TODO Should not need to offset this
101+
_divider.GlobalPositionX + _box.PaddingX / 2 + _node.DividerLeftOffset - 2,
103102
_divider.GlobalPositionY + _box.PaddingY / 2,
104103
_divider.Width + graphicSizeIncrease,
105-
10);
104+
// @NOTE I have no clue why 3 works here...
105+
3);
106106

107107
GUI.Label(position, _dividerGraphic);
108108
}
@@ -116,7 +116,7 @@ private void PaintVerticalBottom () {
116116
_box.GlobalPositionX + _node.Width / 2 + _box.PaddingX - 2,
117117
_box.GlobalPositionY + _node.Height + _box.PaddingY - 1,
118118
100,
119-
_box.PaddingY - 1);
119+
_box.PaddingY);
120120

121121
GUI.Label(position, _verticalBottom);
122122
}
@@ -130,7 +130,7 @@ private void PaintVerticalTop () {
130130
_box.GlobalPositionX + _node.Width / 2 + _box.PaddingX - 2,
131131
_box.GlobalPositionY + _box.PaddingY / 2,
132132
100,
133-
10);
133+
_box.PaddingY / 2);
134134

135135
GUI.Label(position, _verticalTop);
136136
}

0 commit comments

Comments
 (0)