Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally disable animating items when dropping #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

parnic
Copy link

@parnic parnic commented Nov 12, 2021

When this is enabled, items beneath the dropped item re-animate into
place after the user drops something in the list. This feels like a bug,
but I went ahead and made it an option in the interest of not changing
existing behavior for existing users of the library.

Note that the duration is set to 1 because the render animation system
ends up throwing an exception if it's set to 0. I tried replacing the
AnimatedSize widget entirely when this option was set, but swapping an
animated widget in right when we want it to animate means it doesn't
know what its previous size was, so it can't animate. In other words: a
duration of 1 feels wrong, but it's there for a reason.

When this is enabled, items beneath the dropped item re-animate into
place after the user drops something in the list. This feels like a bug,
but I went ahead and made it an option in the interest of not changing
existing behavior for existing users of the library.

Note that the duration is set to 1 because the render animation system
ends up throwing an exception if it's set to 0. I tried replacing the
AnimatedSize widget entirely when this option was set, but swapping an
animated widget in right when we want it to animate means it doesn't
know what its previous size was, so it can't animate. In other words: a
duration of 1 feels wrong, but it's there for a reason.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant