Closed gdanov closed 1 year ago
It's not well-documented, and I am not certain from my current recollections. I would start by looking here:
I think you should be able to use the drop lifecycle event handlers in combination with a snapbackAnimator to get custom drop animation behavior (perhaps by setting some kind of state if necessary), and optionally they can return custom snapback targets. By default, I think the snapback target for a successful drop is the receiver of the drop. The snapbackAnimator should be honored regardless of whether snapping back to the original position, the receiver position, or a custom target.
That is to say: "snapback" is perhaps a misleading name, because it can actually snap "forward" too.
Do I understand correctly that when the draggable is over valid target, the snapping will happen towards the target?
If that's the case, I get it, will experiment. Thanks a lot!
It worked! Pretty neat design :)
Yes that's correct, glad it worked for you :)
in issue https://github.com/nuclearpasta/react-native-drax/issues/28 custom animation can be provided for snap back. I'd like to have custom animation on drop (have the item disappear via animating transform 1 -> 0 for example). Is that currently possible?