Commit 5e984b9
authored
fix: align span panel to worker lane coordinate system (#341)
The span panel canvas was using panel.clientWidth directly, which
includes the 100px padding-left and does not account for the vertical
scrollbar on lanesContainer. The lane canvases use a narrower drawing
area (content width minus scrollbar). Because both use the same
viewStart/viewEnd range, a wider span canvas produced a scale mismatch
that grew linearly with x-position: spans lined up on the left but
drifted increasingly further right of their corresponding polls.
Narrow the span canvas to match the lane canvases by subtracting
LABEL_W and scrollbarW from panel.clientWidth.
Mouse handlers use the canvas's getBoundingClientRect().width so they
remain self-consistent with the resized canvas.1 parent 65a7ac3 commit 5e984b9
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2063 | 2063 | | |
2064 | 2064 | | |
2065 | 2065 | | |
2066 | | - | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
2067 | 2071 | | |
2068 | 2072 | | |
2069 | 2073 | | |
| |||
0 commit comments