Is it a bug at <Animatable.kt#173> since `clampedV...
# compose
t
Is it a bug at Animatable.kt#173 since
clampedValue
is the actual result but never being used
a
@Doris Liu
d
It would seem so. Thanks for bringing it up. Please feel free to file a bug. 🙂
t
v
Seems like this broke almost all my animations in weird ways. Hope this will be fixed soon 🤞🏻
d
@Vsevolod Ganin could you share more on how they behave now? Do you use bounds in almost all your animations? I wouldn't expect this to have any impact on unbounded animations.
v
Yes I use them pretty frequently, they are very convenient. For example, in my implementation of NumberPicker I use bounds to restrict user to go beyond supplied range of numbers. Another example is canvas which user zooms and pans. Again I restrict user to go beyound bounds of the canvas on values that comprise “a camera”. Also I use
updateBounds
in my swipe-to-delete implementation and a couple of other draggable composables
So what I see now is that bounds are not respected if use
snapTo
which is main instrument to implement drags. I think it still works with
animateTo
and
animateDecay
which I use to implement flings
d
Could you add that to the issue linked above? I considered having
snapTo
supercede bounds as it's a deliberate function call. One can always check bounds before calling
snapTo
. But perhaps that doesn't map well with the mental model of bounds. 🙂
👌🏻 1