Skip to content

Commit 72fc2b5

Browse files
committed
Fix ring height calculation (again)
556f80a fixed it for rings without fibers but broke it for ones with them.
1 parent d3837ea commit 72fc2b5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/layout.ml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ let rec make_y_absolute i parent =
168168
)
169169

170170
let layout_ring ~duration (ring : Ring.t) =
171-
let max_y = ref 1 in
171+
ring.height <- 1;
172172
let visit_domain root =
173173
root.Ring.cc |> Option.iter @@ fun (_ts, (i : item)) ->
174174
i.y <- 1;
@@ -184,11 +184,10 @@ let layout_ring ~duration (ring : Ring.t) =
184184
i.end_cc_label <- child.end_cc_label;
185185
);
186186
);
187+
ring.height <- max ring.height (i.height + i.y);
187188
make_y_absolute i ring.y;
188-
max_y := max !max_y (i.height - 1);
189189
in
190-
List.iter visit_domain ring.roots;
191-
ring.height <- !max_y + 1
190+
List.iter visit_domain ring.roots
192191

193192
let of_trace (trace : Trace.t) =
194193
let start_time = trace.start_time in

0 commit comments

Comments
 (0)