AliasIO / Raphael.FreeTransform

Free transform tool for Raphaël elements.
http://elbertf.com
363 stars 107 forks source link

Bug when performing an invert-transform #33

Closed Siyfion closed 12 years ago

Siyfion commented 12 years ago

I have an issue when using a Raphael Set, with the freeTransform. See the example code here: https://gist.github.com/3135492

Essentially if you use the scaling adorners to "invert" the set, the set seems to go back to the default position (which it shouldn't) and the adorning elements get really messed up.

Let me also say what a fantastic library this is, so thanks!

EDIT: This actually seems to have the same effect when using a "standard" element... FYI I've tried this on both Chrome and FireFox on Ubuntu.

Siyfion commented 12 years ago

As an example of the effect see: http://imgur.com/Q7Ls3

AliasIO commented 12 years ago

It looks like I forgot to take negative values into account in the default settings. Adding this should fix it for now:

ft.setOpts({ range: { scale: [ -99999, 99999 ] } });
Siyfion commented 12 years ago

Awesome, might be worth updating this in the repo, but thanks for the quick fix!

Siyfion commented 12 years ago

Confirmed as working fix.

AliasIO commented 12 years ago

Fixed in 5c8eb262ab5077876984af028e5a6d313f804cd7. I also fixed an issue where if scale equals zero the element would jump back to its original size.