You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
the new scrubbing algo will clip the resulting value (eg opacity can't go below 0), but the internal variable tracking the distance travelled still continues to decrease when you move the pointer further left, meaning you need to travel an indeterminate (because of OS pointer acceleration algo) distance to the right before you hit 0 again. This is annoying if you're trying to set eg a low, but not zero, value.
The same probably true with clipped upper bounds.
Solution
The internal variable tracking the distance should not decrement further if the clipping of the target variable has been triggered on either side (but the mouse pointer should still be allowed to move.
Example: initial value is opacity: 50%. Drag to the left, value decreases to 10%, then 0%. Keep dragging a few hundred pixels further to the left, value stays (clipped) at 0%. Now change direction and drag a few pixels to the right. Expected: the value increases immediately-ish after the direction change.
The text was updated successfully, but these errors were encountered:
#6331)
**Problem:**
Today when scrubbing the value on mouse movement we still keep track of
the original movement delta, causing an issue where it's hard to return
after passing the thresholds
<video
src="https://github.com/user-attachments/assets/4298be75-4449-45dd-a961-df89094300d7"></video>
**Fix:**
Keep track of the clamped mouse movement as well. This required adding a
way to invert our `calculateDragDelta` function, in order to retrieve
the "clamped" mouse movements after clamping the total value.
<video
src="https://github.com/user-attachments/assets/d7005f59-b12b-46d8-9a3d-9fad3961e717"></video>
**Manual Tests:**
I hereby swear that:
- [X] I opened a hydrogen project and it loaded
- [X] I could navigate to various routes in Preview mode
Fixes#6299
#6331)
**Problem:**
Today when scrubbing the value on mouse movement we still keep track of
the original movement delta, causing an issue where it's hard to return
after passing the thresholds
<video
src="https://github.com/user-attachments/assets/4298be75-4449-45dd-a961-df89094300d7"></video>
**Fix:**
Keep track of the clamped mouse movement as well. This required adding a
way to invert our `calculateDragDelta` function, in order to retrieve
the "clamped" mouse movements after clamping the total value.
<video
src="https://github.com/user-attachments/assets/d7005f59-b12b-46d8-9a3d-9fad3961e717"></video>
**Manual Tests:**
I hereby swear that:
- [X] I opened a hydrogen project and it loaded
- [X] I could navigate to various routes in Preview mode
Fixes#6299
Problem
the new scrubbing algo will clip the resulting value (eg opacity can't go below 0), but the internal variable tracking the distance travelled still continues to decrease when you move the pointer further left, meaning you need to travel an indeterminate (because of OS pointer acceleration algo) distance to the right before you hit 0 again. This is annoying if you're trying to set eg a low, but not zero, value.
The same probably true with clipped upper bounds.
Solution
The internal variable tracking the distance should not decrement further if the clipping of the target variable has been triggered on either side (but the mouse pointer should still be allowed to move.
Example: initial value is
opacity: 50%
. Drag to the left, value decreases to 10%, then 0%. Keep dragging a few hundred pixels further to the left, value stays (clipped) at 0%. Now change direction and drag a few pixels to the right. Expected: the value increases immediately-ish after the direction change.The text was updated successfully, but these errors were encountered: