Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow multiple events for SVG.on(). E.g.: #727

Closed
Fuzzyma opened this issue Jul 28, 2017 · 0 comments
Closed

Allow multiple events for SVG.on(). E.g.: #727

Fuzzyma opened this issue Jul 28, 2017 · 0 comments

Comments

@Fuzzyma
Copy link
Member

Fuzzyma commented Jul 28, 2017

rect.on('mousemove,touchmove', function(){})

Or:

rect.on('mousemove', 'touchmove', function(){})
Fuzzyma added a commit that referenced this issue Jul 28, 2017
- `SVG.on()` calls the listener in the context of the passed object. el.on always uses the svg.js object as context
- `SVG.on()` and `el.on()` now accepts multiple comma or space seperated events e.g. "mousedown, foo bar" (#727)
@Fuzzyma Fuzzyma closed this as completed Jul 28, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant