Commit Graph

7 Commits

Author SHA1 Message Date
schroda
6d47ab05c1 Improve mouse drag detection
Ignore mouse movements in directions where the element does not have a content overflow and thus, scrolling is not possible
2025-02-03 16:30:08 +01:00
schroda
eeb811bf2d Handle flex "column-reverse" for mouse drag scrolling inertia 2025-01-21 19:19:29 +01:00
schroda
18a46c0a28 Handle flex "row-reverse" for mouse drag scrolling inertia 2025-01-21 19:19:28 +01:00
schroda
8eae025d8f Use "coerceIn" util function 2024-12-29 23:41:27 +01:00
schroda
3238103ca0 Fix "rtl" detection in "useMouseDragScroll"
"isRTL" was set to the direction value instead of correctly to the boolean flag indicating if it is the actual rtl direction value.

This didn't cause any issues because for ltr because for ltr the result of "scrollAtT0.current[X] - delta[X])" was never less than "-maxScrollPos[X]" and for rtl it always used the expected value since "isRTL" was truthy.
2024-12-29 22:14:44 +01:00
schroda
9c5382ebd7 Support RTL mode for mouse drag inertia effect
Compared to LTR were the "scrollLeft" value is >= 0, for RTL it's <= 0 which was not handled and thus on applying the inertia effect, "scrollLeft" was always set to 0 due to preventing negative values
2024-12-09 16:12:37 +01:00
schroda
206c216093 Add mouse drag scrolling to continuous pagers 2024-12-09 02:38:37 +01:00