Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Zoom factor is not constant when resizing the window #5

Open
vxgmichel opened this issue Jan 26, 2017 · 1 comment
Open

Zoom factor is not constant when resizing the window #5

vxgmichel opened this issue Jan 26, 2017 · 1 comment

Comments

@vxgmichel
Copy link
Member

vxgmichel commented Jan 26, 2017

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
Copy link
Collaborator

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".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants