Skip to content
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

Update shiftKey & altKey values during __onMouseMove() #3479

Merged

Conversation

stefanhayden
Copy link
Member

Currently the values of shiftKey & altKey are set on mouseDown and only the cached values are referenced during mouseMove events. This means if you start a transform and then want to hold alt to centerTransform you can't until you stop transforming and hold alt before starting the transform.

This change updates the values during mouseMove which lets you start a transform and add the key modifier on the fly.

@asturur asturur merged commit 6074660 into fabricjs:master Dec 2, 2016
@asturur
Copy link
Member

asturur commented Dec 2, 2016

it creates a little inconsistency because with rotation we cannot do that for some weird reason.
But it feels good!

@asturur
Copy link
Member

asturur commented Dec 2, 2016

I m guessing if that hardCoded shiftKey is a missed uniscaleKey.

asturur pushed a commit that referenced this pull request Dec 2, 2016
@stefanhayden
Copy link
Member Author

hmm. I got that shiftKey reference from here: https://github.com/kangax/fabric.js/blob/52013a94d18a6c6ce6ead426176ce8709c6c7ccb/src/canvas.class.js#L625

should that also use the uniScaleKey?

@asturur
Copy link
Member

asturur commented Dec 2, 2016

not before a full read of what is there.
I remember i spent some time naming the keys insted of having them fixed. Why that shift is still fixed.

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

Successfully merging this pull request may close these issues.

2 participants