Skip to content

Nifty additions to L.Mixin.Events...take 2#770

Merged
mourner merged 1 commit intoLeaflet:masterfrom
Guiswa:master
Jun 30, 2012
Merged

Nifty additions to L.Mixin.Events...take 2#770
mourner merged 1 commit intoLeaflet:masterfrom
Guiswa:master

Conversation

@Guiswa
Copy link
Copy Markdown
Contributor

@Guiswa Guiswa commented Jun 29, 2012

Removing the built files...

Inspired by the on/off methods in jQuery.

Allow L.Mixin.Events.addEventListener() to accept a map in which the string keys represent one or more space-separated event types and the values represent a handler function to be called for the event(s).

Allow L.Mixin.Events.removeEventListener() to accept one or more space-separated event types. Omitting the fn parameter will remove all event handlers for the supplied event type(s).

Also allow L.Mixin.Events.removeEventListener() to accept a map where the string keys represent one or more space-separated event types and the values represent handler functions previously attached for the event(s).

Add unit tests for the above changes.

Update build.

…string keys represent one or more space-separated event types and the values represent a handler function to be called for the event(s).

Allow L.Mixin.Events.removeEventListener() to accept one or more space-separated event types. Omitting the fn parameter will remove all event handlers for the supplied event type(s).

Also allow L.Mixin.Events.removeEventListener() to accept a map where the string keys represent one or more space-separated event types and the values represent handler functions previously attached for the event(s).

Add unit tests for the above changes.
@mourner mourner merged commit 95ed9cd into Leaflet:master Jun 30, 2012
@mourner
Copy link
Copy Markdown
Member

mourner commented Jun 30, 2012

Thanks, merged :)

@mourner mourner mentioned this pull request Jun 30, 2012
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.

2 participants