fix(examples): keep the glfw demo's region off the pan path, and print the multiplot's region geometry
Adding a grabbable region across the middle of the glfw demo turned the pan gesture PLOT_DEMO_FOLLOW makes -- and a user's own centre drag -- into a region drag, which that mode's self-check reported as 'distance behind only by the pan: NO' and exit 1. The region now rides the left sixth of the live window, so a press in the middle pans exactly as it always did, and the reason is written where the bounds are placed. The multiplot demo also prints its region's last-frame fill rect and bound columns, so the exit frame's region pixels can be read against the geometry Plot::layout() measured. Report: .superpowers/sdd/p2-task-7-report.md
This commit is contained in:
1 parent
942f88c568
commit
a70c381a1e
2 files changed
+17
-1
No files matched your search
@@ -580,7 +580,12 @@ int main() {
|
||||
} else {
|
||||
graph.set_cursor_x(cursor_a, xr.min + 0.35 * xr.span());
|
||||
graph.set_cursor_x(cursor_b, xr.min + 0.65 * xr.span());
|
||||
graph.set_region(region, xr.min + 0.40 * xr.span(), xr.min + 0.60 * xr.span());
|
||||
// The region sits on the left sixth of the window, not across its middle: it is a
|
||||
// grabbable handle, so a region over the centre would turn the pan gesture the
|
||||
// `PLOT_DEMO_FOLLOW` script makes (and the pan a user makes) into a region drag.
|
||||
// The two cursors stay where they are -- neither is within a grab radius of the
|
||||
// centre either, which is why the script's pan has always been a pan.
|
||||
graph.set_region(region, xr.min + 0.06 * xr.span(), xr.min + 0.18 * xr.span());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user