Ticket #2725 (closed bug: fixed)
PanZoomBar doesn't handle forceFixedZoomLevel correct
| Reported by: | patzi | Owned by: | patzi |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.11 Release |
| Component: | Control.PanZoomBar | Version: | 2.9 |
| Keywords: | FixedZoomLevel PanZoomBar | Cc: | marcjansen |
| State: | Complete |
Description
When setting up a map with fractionalZoom: true and a PanZoomBar control with forceFixedZoomLevel: true there seems to be a bug in the implementation. If you start at a fixed zoom level and use the zoombar slider you will get a fixed zoom level back (i.e. start from 2 move up 3 get 5). But if you start with a non fixed zoom level you will get a non fixed back (i.e. start from 2.345 move up 3 get 5.345). Maybe this is the way somebody wanted it to be, but for me it feels a bit broken. Also there is an error when you move the slider to the bottom of the bar. Then it returns a negative zoom level and can not zoom to it. In the attached patch I fixed both issues so that you will get back a fixed level and 0 as the minimum zoom level.

