-
Notifications
You must be signed in to change notification settings - Fork 50
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
onViewportChange not triggered using NavigationControl #234
Comments
I'd like to have this fixed too. @stepankuzmin Shall I submit a PR? |
Hey @jperals! It would be really great! PRs are welcome! |
It seems like the problem is that MapGL's I worked around this by just checking that the event exists (or that it's truthy, to be more exact) instead of its properties: jperals@f6fd40b So this is the simplest solution I could come up with. Would it make more sense to check for some other properties in the object instead? This doesn't seem to have side effects for our use case and passes the tests (though I had to modify one of them as you can see), but of course I'm open to your feedback @stepankuzmin. |
Thanks for the research, @jperals! Unfortunately we can't remove check for I've created PR for this in |
This should be fixed in the nest version of |
Just stumbled upon the same problem in the GeolocationControl (#276). Is there any update on when a new version will arrive that fixed this? |
Describe the bug
Using default map zoom controls not triggering viewport change event in parent
<MapGL>
To Reproduce
Steps to reproduce the behavior:
onViewportChange={viewport=>console.log(JSON.stringify(viewport))}
to<MapGL>
component+/-
in NavControl ... no outputExpected behavior
Would expect event to be triggered using NavigationControl but instead it only seems to affect the map-gl instance
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: