fix(figure): a following group keeps its whole window on the data
The offset of a following group was clamped to `retained` -- measured from the newest sample -- so a pan (or a zoom-in anchored near an edge) could put the window's *right* edge exactly on the oldest retained sample. That leaves the window's entire span to its left over data the scope never had: an empty margin as wide as the view. The bound is about the whole window, so it is `retained - span` -- but only while the window *can* sit on the data. When the members retain less than a window's worth (a ring still filling, or one just trimmed) nothing avoids a margin, and the older placement is the honest one and stays: right edge on the newest sample, the shortfall on the left. Test: a_following_group_keeps_its_whole_window_on_the_data -- asks to scroll ten spans past the oldest sample and asserts the window is still a window, with its left edge on the data. The existing `a_following_log_group_holds_decades` codified the old bound (`max == edge/10` after asking for a decade of pan with far less than that retained); its log-space subject is unchanged and the offset assertion is now the invariant above.
This commit is contained in:
1 parent
7dbe4e7183
commit
faef19ba60
4 files changed
+71
-6
No files matched your search
@@ -29,6 +29,10 @@ run touched a GPU, so read it as an upper bound and a record of the software pat
|
||||
|
||||
## Features
|
||||
|
||||
- a following group's window stays on its members' data: while the members retain at least a
|
||||
window's worth, the scroll offset is bounded by `retained - span`, so a pan or a zoom-in near an
|
||||
edge cannot leave the window's own span over data the scope never had (a window *wider* than the
|
||||
data keeps the older placement -- right edge on the newest sample);
|
||||
- sample **markers** when a window is sparse enough that its samples are the shape
|
||||
(`Style::marker_below_samples`, 50 by default, `marker_px` across, in the trace's own colour);
|
||||
- grid with independent major/minor line classes (`Style::grid_major_visible`,
|
||||
|
||||
Reference in new issue
Block a user