Skip to content

Why does scaling effect the "x", "y" #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
demobiel opened this issue Oct 7, 2018 · 2 comments
Open

Why does scaling effect the "x", "y" #3

demobiel opened this issue Oct 7, 2018 · 2 comments

Comments

@demobiel
Copy link

demobiel commented Oct 7, 2018

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?

@bperel
Copy link

bperel commented Jun 15, 2019

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!

@devonik
Copy link

devonik commented Jan 20, 2020

Got same issue here. Hopefully fixed someday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants