JS condition depending on the coordinates of the object?

Not know js, there is an animation where the object moves along the radius and stops at a certain place.
How to set the condition that when you click on another similar object, the object continued moving in a circle and another object began to move on the same radius? It turns out I need to set a condition with the coordinates? It turns out that I need to create a condition indicating the coordinates of the first object, the script could figure out where the first object should continue its movement? But how does it apply? Also I will be happy for any material on this topic. Thank you.
5afc3a6e859f1845571100.jpeg
Attached a picture to make it clearer. By clicking on the object 1 - it moves radially and comes to place the object 3 and objects 2 and 3 respectively are shifted by 1 up. Thus, the object 3 takes place the 2nd and the 2nd gets in the first place.
June 5th 19 at 21:44
1 answer
June 5th 19 at 21:46
Why do you need coordinates?
You can make it easier - to put a mark of 0 at the top of the circle (where the clock hand on 12) and to measure a length of the segment traversed by the point 1.
To measure in pixels you mean? And then if for example point 1 has moved to the point 3, I press 2(which was the first) and point 1 is shifted to the middle in place of point 3, and point 3 becomes the first, as point 2 goes into the tail and becomes the last. How can I when you click on any of the points to determine how much they have shifted, because they can have one of three positions. - patsy_Lehner66 commented on June 5th 19 at 21:49
You can remember where it was originally located each point.
Also remember which segment (available in px) has passed each point.

You can also get the coordinates of a point knowing the radius of the circle and angle - Yvette_Sau commented on June 5th 19 at 21:52

Find more questions by tags AnimationJavaScriptjQuery