What if you offset the center point of the green dot artwork to the place where the red dot is? Then. instead of moving the green dot, you rotate the div. (Doing it this way I think you actually get the angle calculated for "free".)
Take a loook at this topic - about the circular dragging - I opened and Tim resolved: http://forums.adobe.com/message/4811284#4811284. You can find there also the project files!
Have a nice day!
Thank you both for your input. I will work on that today and will try to post my files when I am done in order to help anyone who want to do something similar - that is if I get it to work as I want.
OK. I offseted the center point and it works great in dev in EA - I mean that when I drag the green dot it does rotate on the arc. However with draggable, there are 3 possibilities:
- non restrain on x or y - the green dot can be dragged in any direction and does not stay on the arc
- restrain on x - expected - the dot is limited to x (straight line left and right )
- restrain on y - expected - the dot is limited to y (straight line up and down)
I posted a question on jqueryUI and we will see if they find a way there!
Tim's example on the link provided by Davide is perfect!