You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create event handler that calls canvas.discardActiveObject()
attach handler to canvas.on('object:modified', handler)
create any object, like a rect and add it to the canvas.
select the object and move it, when releasing the mouse it will trigger object:modified and call the handler
Expected Behavior
I expect that it wont trigger object modifed because when calling discardActiveObject from a button lets say, it does not trigger the object modifed event.
Actual Behavior
it will discard and modify in a loop
Error Message & Stack Trace
too many recursions
The text was updated successfully, but these errors were encountered:
Discarding an object that is currently trasforming will terminate its transform action.
If what you want is to deselect on object:modified i would suggest you get target.canvas._currentTransform and you set it to null before deselecting.
I think the code should be fixed to avoid this infinite loop anyway.
CheckList
Version
6.0.2
In What environments are you experiencing the problem?
Firefox
Node Version (if applicable)
None
Link To Reproduction
https://stackblitz.com/edit/nuxt-starter-638zzj?file=app.vue
Steps To Reproduce
Expected Behavior
I expect that it wont trigger object modifed because when calling discardActiveObject from a button lets say, it does not trigger the object modifed event.
Actual Behavior
it will discard and modify in a loop
Error Message & Stack Trace
The text was updated successfully, but these errors were encountered: