Zoom factor is not constant when resizing the window
vxgmichel opened this issue · 1 comments
vxgmichel commented
I noticed the zoom factor is almost but not constant when resizing the window. This can cause an unexpected switch of the zoom layers. Typically, starting a synoptic then going fullscreen might trigger a transition from layer 0 to layer 1. An easy hack is to configure the first zoom step to 1.1 instead of 1:
// disabling zoom by only allowing one step
var config = {view: {zoomSteps: [1.1, 4]}};
johanfforsberg commented
This one might not be trivial to fix completely, but maybe introducing some tolerance in the zoom level switching would help. I.e. when you are in level 1, the scale will have to go to at least e.g. 1.1 before we switch the zoom to the next level, but in order to get back to level 1, you have to scale to 1. This would make the zoom levels just a little bit "sticky".