Is there a way to switch states of a layer only if it is not being animated? I change layer states on DragStart, and later conditionally in Drag. These conditionals interfere with the initial DragStart animation.
Do you know how to overcome this?gif (watch white square): http://www.gfycat.com/ConcernedChiefIndriproject: http://share.framerjs.com/1usxhh5mnlts/
Thanks a lot!
Hey Andy Jakubowski - yes, you can include a little flag within your DragMove event that checks whether or not jaws is animating. Like this:
Another thing I think is causing some jumps of your fish layer is that you're listening to the DragEnd event while also having momentum enabled by default. So it'll sometimes switch positions because it's also trying to simulate some momentum. You can easily fix this by disabling it: fish.draggable.momentum = false
Checking for isAnimating did help. I am still getting unexpected behavior, probably because I’m using spring curves and it’s taking a while before Events.AnimationEnd is called. Going to keep poking at it.