Thank you,
I realised just after posting I had not included Raphael. Obviously it works better that way.
Your answer implies that I might be able to do the same thing without using Raphael (I've never used it so I don't mind using a simpler way).
What I want to do is to combine the ability to drag and to spin an object.
I'm a junior high math teacher and my final goal is to implement a web app to demonstrate geometrical constructions using tools such as ruler, set square, protractor...