fix(input): cursors follow the pointer while dragging and snap on drop
This commit is contained in:
1 parent
ea70cf4fca
commit
d2ba67921e
7 files changed
+292
-27
No files matched your search
@@ -89,7 +89,10 @@ using plot::RegionGrab;
|
||||
/// grabbed cursor's orientation owns -- `set_cursor_x()` for a marker,
|
||||
/// `set_cursor_y()` for a ruler -- and a dragged ruler is clamped to its own y
|
||||
/// axis' range, because a pointer past the top or bottom of `axes` has no data
|
||||
/// under it to follow (see `move_cursor()`).
|
||||
/// under it to follow (see `move_cursor()`). The writes are *free*, so the marker
|
||||
/// tracks the pointer for the whole gesture rather than hopping between the samples
|
||||
/// it would otherwise snap to; the cursor's own snap rule is applied once, on
|
||||
/// release (`Plot::snap_cursor()`), exactly as a region's is.
|
||||
/// 2. **Regions next**, resolved nearest-first against the geometry `Plot::layout()`
|
||||
/// measured: a bound within the grab radius beats the body (so the bound of a
|
||||
/// wide region is grabbable even though the pointer is inside the fill), the
|
||||
@@ -161,7 +164,7 @@ using plot::RegionGrab;
|
||||
/// The plot geometry the controller hit-tests in is device pixels (see
|
||||
/// `PlotLayout`), and each adapter converts its pointer coordinates into the same
|
||||
/// space before forwarding them. A tolerance written as a device constant would
|
||||
/// therefore change its *physical* size with the display: a 5 px grab radius is
|
||||
/// therefore change its *physical* size with the display: a 7 px grab radius is
|
||||
/// half the hand movement on a 2x panel, so the same cursor becomes harder to
|
||||
/// catch there. Both tolerances -- the cursor grab radius and the box-zoom click
|
||||
/// threshold -- are therefore logical constants, converted through
|
||||
|
||||
Reference in new issue
Block a user