Move back in path animate

I have a circle that move on path.
I want that if circle not move enough (under 20%) the circle back to start place and let the user drag again and again.
so in my code that work like i need if user over the limit.
but if not the circle jump to the start and make the animate again before user can drag.
i dont want that animate.

ZAPP: circle on Squiggle moved | ZIM JavaScript Canvas Framework

Why is it animating from the left to the right? Why not just start on the right (rotate or flip the path)? It would probably make it easier. Then, if rewind is true, when you let go, convert the percentComplete to 100-percentComplete and finish the animation so it goes back to the start.

If there is a problem, possibly using two paths with two circles and swap them at different states might e a solution.

If i flip it how that way that work?

From what I could tell, you are wanting to drag from the right to the left. So it would be easier to put the first point of the squiggle on the right. You can do that by calling reversePoints() on the squiggle or by rot(180) or by setting sca(-1,1).

Does that make sense?