Raphael.FreeTransform
Raphael.FreeTransform copied to clipboard
A problem with rotate on self
Hi
Thanks, ElbertF, for the great work!!! It helps so much...
I am trying to rotate an image using the 'self' option. it rotates to the wrong direction, and too slowly.
It works great with axisX.
Here is a fiddler: http://jsfiddle.net/yag2j/
Thanks again
I think the CSS is confusing Raphael, if I remove the body margin and absolute positioning on the canvas it works: http://jsfiddle.net/yag2j/.
Thanks a lot, ElbertF
I went a little further, and stripped as much as I could from the code.
I discovered that once I put anything before the cannon, it spoils the movement.
Doesn't have to be specific css attributes like margin or position.
It gets worse as the size of whatever is there gets bigger: http://jsfiddle.net/yag2j/3/
I am sure it's something simple that I am missing... I have never used raphaeljs before (in fact, I am only using it here because of your plugin), so I guess I'll have to dig into it now, or code the rotating bit by myself (oh no!)
Cheers
Sorry, closed it by mistake. I still have some hope :)
The mouse position doesn't seem to take the offset into account. It's a bit clearer here:
http://jsfiddle.net/NFHBc/
Rotate the object and move your mouse up 100px, it will behave more logical. It seems like a Raphael bug to me, dragging should be relative to the paper and not the document. When I find some time I'll look into it a bit more.
Yes, I see what you mean. Thanks for your time and effort!