vue-free-transform
vue-free-transform copied to clipboard
Why does scaling effect the "x", "y"
Hi
first of all, this plugin seems very nice, but I don't understand what happens when you scale the object with the scale handlers.
It seems that inside the payload object returned by the update event the x and y attribute changes as well even if you use the right bottom handler.
It seems to me this should only be the case if the top corner changes it's position (as I understand that that is what "x" and "y" is.
I forked your example and added some logging: https://codesandbox.io/s/l49ryyjjom
Am I misunderstanding what is going on?
Same issue here. It looks like the "x" value is recalculated when scaled (with or without the "scale-from-center" property set). Let's say that I have a shape with an initial x position of 10, a width of 25 and a scaleX of 1. If I scale the shape so that scaleX becomes 2, then the x data becomes (10+25)=35. I don't dare to change the code though, there could some side effects if I try to change the logic!
Got same issue here. Hopefully fixed someday