-
-
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(#9498): refactor endCurrentTransform #9500
base: master
Are you sure you want to change the base?
Conversation
Build Stats
|
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.
This looks good to me, let's see what tests have to say
}; | ||
|
||
target.setCoords(); | ||
this._currentTransform = null; |
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.
this is a change done when sqaushing _finalizeCurrentTransform
requiring a bit more work to adapt mouse up logic
Somehow it was working in javascript before. |
Where is the exception thrown? |
You understand correctly |
stack call drill down: I can do a patch that is not as clean as this and PR this on top. Should I? |
Actually I think not because the only change needed is in types making e optional in the modified event |
blame points to 20a87c6#r132964644
Sorry i completely forgot about this on. |
I don't understand what you suggest. Isn't that this PR? Are you missing a comment in the code? |
we fix the type issue with this: #9596 |
Motivation
closes #9498
Description
I encountered an exception thrown by fabric when using
_discardActiveObject => endCurrentTransform
w/o passing thee
param which was typed as optional in_discardActiveObject
but was not inendCurrentTransform
/modified
event.Types were wrong, that is why we missed it.
I had to refactor some code and that made some cleanup possible.
Changes
_finalizeCurrentTransform
=>endCurrentTransform
and moved fromCanvas
toSelectableCanvas
FabricObject#isTransforming(action)
_scaling
flag: blame point to 20a87c6#diff-8eca4d2c9c7324551d9e6a7ce3817a987c9d598332b3f2f6ab02d2f1c98cde4fR1033 - not used by fabric =>isTransforming('scale')
can be used insteadisMoving
=>isTransforming('drag')
is used instead_handleEvent
to support passing a custom object needed for mouse up after_currentTransform
has been nullifiedGist
In Action