-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
refactor(Canvas): _setupCurrentTransform
=> setupCurrentTransform
fixing control mousedown unexpected behavior
#9842
base: master
Are you sure you want to change the base?
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Build Stats
|
e29076e
to
5f05699
Compare
c29db80
to
51d4967
Compare
51d4967
to
f7c785d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready to merge
_setupCurrentTransform
=> setupCurrentTransform
fixing control mousedown unexpected behavior
@asturur if this can merge into the rc I would appreciate that |
_setupCurrentTransform
=> setupCurrentTransform
fixing control mousedown unexpected behavior_setupCurrentTransform
=> setupCurrentTransform
fixing control mousedown unexpected behavior
The issue with this PR is that on top of fixing a bug you go into a refactor of setupCurrentTransform without explaining why that refactor is necessary or if is just a preference. |
When we add ci() build() feat() on the title of the PR i think we are looking at this convetion: https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines In general this is a refactor, not sure what 'dep' means. |
Yes, I meant deprecation, refactor is more suiting I guess |
updated description
|
Description
I found a minor bug during work.
If an object is not selected
_setupCurrentTransform
sets adrag
action.However, if
findControl
returned a control the down handler would get called.This PR fixes that.
_setupCurrentTransform
in favor ofsetupCurrentTransform
As part of the PR I refactored
setupCurrentTransform
to accept the control it should setup or the drag action (which was the default switch if no control was found or if the object wasn't already selected before the mousedown) and a new option of undefined.I did that to make the code simpler, now we just pass down args instead of letting
setupCurrentTransform
make decisions. Passing down undefined is also an important option that enables an app to control if/how the drag action is setup. I have done a lot to workaround the default drag transform action and this refactor makes it really simple.In Action
Run the following on master and see it fail