Repository navigation
Layer event delegation - #4329
Merged
Merged
Conversation
mourner
approved these changes
Feb 28, 2017
mourner
left a comment
Member
There was a problem hiding this comment.
Fantastic! Would love merging this once the build is green.
| * @returns {Map} `this` | ||
| */ | ||
| on(type, layer, listener) { | ||
| if (listener === undefined) { |
| * @returns {Map} `this` | ||
| */ | ||
| off(type, layer, listener) { | ||
| if (listener === undefined) { |
Member
I think we could do both and alias one for the other, since there should be no difference in context of a map (in DOM context, there's only a difference when considering child elements, but we have a different model). |
jfirebaugh
force-pushed
the
event-delegation
branch
from
March 28, 2017 22:17
aa8e6f8 to
3aeb823
Compare
This was referenced Mar 28, 2017
Merged
jfirebaugh
force-pushed
the
event-delegation
branch
from
March 28, 2017 23:10
3aeb823 to
abf4b2b
Compare
Member
|
Any updates on this PR? |
jfirebaugh
force-pushed
the
event-delegation
branch
from
March 29, 2017 23:04
abf4b2b to
a693b62
Compare
jfirebaugh
force-pushed
the
event-delegation
branch
from
March 29, 2017 23:39
a693b62 to
988d301
Compare
Contributor
Author
|
Finally was able to carve out time to finish this off. 🏁 |
mourner
approved these changes
Mar 30, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1002. I found that in order to really simplify most examples, we need special handling for
mouseenter/mouseleavein addition to basic event delegation. But once we have that, a lot of common cases are simplified.Launch Checklist
mouseenter/mouseleaveormouseover/mouseout?