Skip to content
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

MarkerCollection: marker name in event name #4041

Closed
scofalik opened this issue Apr 6, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-engine#912
Closed

MarkerCollection: marker name in event name #4041

scofalik opened this issue Apr 6, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-engine#912
Labels
package:engine type:improvement This issue reports a possible enhancement of an existing feature.
Milestone

Comments

@scofalik
Copy link
Contributor

scofalik commented Apr 6, 2017

At the moment, model.MarkerCollection class fires two events: add and remove. Other scripts may listen to those events as they are triggered whenever a marker is added or removed from document.

The idea is to change those events names to: add:<markerName> and remove:<markerName>. In probably all scenarios, a feature want to do something only with markers it "recognises" (by name), so each callback added to current events starts with name sniffing.

It would be cleaner and more convenient if event name already included marker name, so the callback won't even fire for wrong marker.

pjasiun referenced this issue in ckeditor/ckeditor5-engine Apr 6, 2017
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 9 milestone Oct 9, 2019
@mlewand mlewand added module:model type:improvement This issue reports a possible enhancement of an existing feature. package:engine labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants