-
-
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
ActiveSelection does not fire Events on addWithUpdate(), removeWithUpdate() #6130
Comments
they won't fire it. you made that button and you are in control of it, you do not need an event. On the button handler, run the code you need. Does it make sense? |
Yes, thats possible. See fiddle above. |
well but your button is going to add or remove from selection, and before doing so you know if you are going to modify or create a selection, depending if you already have one. I do not think addWithUpdate or removeWithUpdate should fire events. i think that the selection is also firing object added and object removed being it part of the group class? |
The selection / group does fire events? What's the name of these events? Never heared of them. |
No it doesn't. Please if you fill strongly about it, try to prove why you think is necessary. I can be wrong about it. |
I appreciate that you are interested in an open discussion. My use case is a special kind of drawing application, where the user is able to select fabric objects with a button at the user interface. Afterwards (s)he can change some properties like Currently it is already somewhat complicated to select or deselect additional fabric objects programmatically. The necessery methods are different if no, one or more objects are already selected. I use the following code (it is in the linked fiddle too)
Of course it is possible to trigger Therefore I think the API would be easier to use - and I think more logical - if Talking about it, I would even suggest, that About the same holds true for the
|
i ll finally be able to read this today! |
Version
3.6.1
Test Case
https://jsfiddle.net/awehring/ygxmbt6d/73/
Information about environment
Browser.
Tested with current Edge, FireFox
Bug Description
An ActiveSelection does not fire Events on
addWithUpdate()
,removeWithUpdate()
.I would expect that
selection:updated
events are fired.Steps to reproduce
Run the fiddle and inspect the browser console.
Click 3 times the "Add to Selection" button until all 3 objects are selected.
Click 3 times the "Reduce Selection" button until no object is selected any more.
The console reports the fired events.
Expected Behavior
addWithUpdate()
,removeWithUpdate()
should fireselection:updated
events.Actual Behavior
These two Methods don't fire
selection:updated
events.The text was updated successfully, but these errors were encountered: