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

feat(timeline): add custom events for markers #132

Merged
merged 4 commits into from Oct 14, 2019
Merged

feat(timeline): add custom events for markers #132

merged 4 commits into from Oct 14, 2019

Conversation

ryamaguchi0220
Copy link
Contributor

@ryamaguchi0220 ryamaguchi0220 commented Oct 9, 2019

Closes #131

This PR adds two custom events

  • markerchange: fired when the marker title has been changed.
  • markerchanged: fired when an alteration to the marker title is committed.

Demo
https://visjs.github.io/vis-timeline/examples/timeline/markers/markerEvents.html

Copy link
Member

@yotamberk yotamberk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job. I do feel though that the event names are unclear. I think they should be called onMarkerInputChange and onMarkerInputChanged.

@ryamaguchi0220
Copy link
Contributor Author

ryamaguchi0220 commented Oct 13, 2019

I do feel though that the event names are unclear

I named the custom events based on change event and input event because I think they are familiar to web developers. If change the names, I propose onMarkerChange and onMarkerChanged or onMarkerTitleChange and onMarkerTitleChanged. What do you think about it?

@yotamberk
Copy link
Member

yotamberk commented Oct 13, 2019

Sounds good enough to me the new names you offered

@ryamaguchi0220
Copy link
Contributor Author

I've renamed the custom events.

@yotamberk yotamberk merged commit 126e481 into visjs:master Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom event which gets fired when a marker has been changed
2 participants