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
Zoom control on map do not work if L_DISABLE_3D = true #6820
Comments
Cannot reproduce (using Leaflet 1.5.1 and Firefox 69 on Debian). https://plnkr.co/edit/6SgcGdbjgU3me18QBKhJ?p=preview |
As I see in documentation:
But in https://plnkr.co/edit/6SgcGdbjgU3me18QBKhJ?p=preview <script src="https://unpkg.com/leaflet/dist/leaflet-src.js"></script>
<script>L_DISABLE_3D = true;</script> Note, that in @IvanSanchez sample zoomDelta: 0.25 bug is reproduced. But if zoomDelta not fractional, bug not reproduced. With best regards, IMMSPgisgroup |
Yes, you are right. The problem is in It means if map has current zoom level 2.0 and user clicks on zoom button in zoom control, Fix is simple: delta = delta || (Browser.any3d ? this.options.zoomDelta : 1); |
Perhaps offtopic here, but I've found that |
To add to this topic, |
@albavilanova for what reason do you need to set |
Hi @Falke-Design, sorry for the delay, I do not know the reason since it was somebody else who set it. However, today I noticed that if I don't include |
We've removed |
Hi @jonkoops, it is good to know that 3d acceleration will be enabled by default, then we are sure that there will be no problems with the zoom snap. I created this piece of code to exemplify what's happening when changing the layers in case you want to test this bug in the upcoming version, you can run the app, remove L_DISABLE_3D and rerun it to see the difference:
You will notice that the center of the map changes when switching between layers, zooming in and out gets the map back to its correct position (weirdly). |
Zoom controls on map do not work if
L_DISABLE_3D = true
.Sample: https://plnkr.co/edit/S6LVFcI4fsPpSVnP5V5h?p=preview
My LeafletJS version - 1.5.1.
OS - Windows 10 Pro 1903 (64-bit).
Browser - Mozilla Firefox 69.0.1 (64-bit).
With best regards, IMMSPgisgroup
The text was updated successfully, but these errors were encountered: