Raphael.FreeTransform icon indicating copy to clipboard operation
Raphael.FreeTransform copied to clipboard

A problem with rotate on self

Open smecticus opened this issue 13 years ago • 5 comments

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

smecticus avatar Sep 19 '12 11:09 smecticus

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/.

AliasIO avatar Sep 19 '12 21:09 AliasIO

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

smecticus avatar Sep 20 '12 07:09 smecticus

Sorry, closed it by mistake. I still have some hope :)

smecticus avatar Sep 20 '12 07:09 smecticus

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.

AliasIO avatar Sep 20 '12 09:09 AliasIO

Yes, I see what you mean. Thanks for your time and effort!

smecticus avatar Sep 20 '12 10:09 smecticus