I've just stumbled upon the new famous 0.5 release and things seem to be quite different (looking good). I want to implement a draggable element with inertia, but I can't figure it out by looking at the new docs.
Can anyone give me some tip on how to do this?
Here is a simple example of using the
GestureHandler
to track the start, move and end of a drag in the famous engine. ThePosition
component will place our node with respect to the delta of our drag event. Notice how thenode
is passed to theGestureHandler
to track our drag events.Warning: As of this posting, the engine is still in Beta (0.5.2), so there is an edge case issue with trying to drag too close to the outside of the element. It may have to do with the default interval of render updates.
Run the snippet example