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
Resize tracking is not working for multiple maps #1980
Comments
You're right, confirmed. Hmm... A tricky problem. Should we stamp contexts and include them in the key too? |
sometimes it could be a desired behavior that a listener overwrites the previous added listener. The |
More solution variants:
|
I tried implementing a solution with context stamping if it is specified, but then found out that there is a lot of existing code (not only Leaflet but many plugins) in which Considering this issue really only affects window resize, I'll try to wrap the passed listener so that it gets different ids. |
Yep, works well with a very simple fix :) |
First work around the Leaflet bug described here: Leaflet/Leaflet#1980 Then only respond to fullscreenchange events for the appropriate target.
Test case: http://jsfiddle.net/cF2zZ/
If you will change page width, the top map updates property while the bottom one doesn't.
Probably, the proplem is that
L.DomEvent
doesn't allow to add listener multiple times to the same object (window
in this case) for the same event type (resize
).The text was updated successfully, but these errors were encountered: