-
-
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
e is no longer sent with selection:cleared event #6306
Comments
I would suggest you, upgrade to 4 unless is very hard. |
The plan is for sure to upgrade to v4, but since this is a commercial project, it feels a bit dicey to upgrade to a beta version or even i newly released major version : ) |
i know, i often find myself to put my own projects with betas in order to get an idea of the solidity of the current status. |
To me it seems that the event is there if the selection:cleared is generated by a mouse event. |
@virror: When I did the upgrade, I looked especially at the triggered events and documented it here: #5695 |
This is the case that used to return evt.e before, but no longer does. |
I checked your fiddle and added a little bit, to inspect the event behavior closer: https://jsfiddle.net/awehring/toubzsrL/20/ If the object is de-/selected programmatically, e is undefined (with If the object is removed, the |
My biggest issue is that this used to work before, and now it does not work anymore : p |
What does e hold in your case? I checked my jsfiddle with fabric.js 1.7.22 and it delivers the same (e is missing in |
Have to check tomorrow when im back at the office : ) |
I must be seriously confused : D No matter, i guess you can disregard this issue then, is there another way of getting the mouse position then using @canvas.getPointer? Because that one needs e which i dont have? |
Your application code must be different to the fiddle example. If youre remove() is triggered by a mouseclick at the canvas, you can catch it with a If you think that it is not a bug, please leave a short note and close this issue. |
I was trying to make sense of this, but whatever road i take it brings me to possible more inconsistency. Using events as hubs for all the logic of the app as always brought me to dead ends for a series of reasons, one of which is that too many events fires at some point. I was thinking of adding a source property to the event, but is also true that the event missing kind of speak for itself. |
Version
3.6.3
Im upgrading from fabric 1 -> 3, and e used to be sent with the selection:cleared event but no longer is. Would it be possible to once again include that? Its sent in selection:created so atm it feels a bit unbalanced and my code kind of requires e to be able to get the mouse position when a selection is removed.
The text was updated successfully, but these errors were encountered: