Skip to content

Zoom out shows the wrong percentage on the minimap. #2669

Discussion options

You must be logged in to vote

It happens because we use simply an <input type="range"/> with a step attribute set to 20 by default.

inputEl.step = 20;
inputEl.value = 99;
inputEl.value; // => '100'

The range can show 100 when the paper scale is set to 0.99.

You can change the step to 1 to overcome this.

{
    type: 'zoom-slider',
    name: 'zoom-slider',
    group: 'zoom',
    step: 1
},

It will result in the user being able to slide to any integer zoom level though.
Other option is to round the zoom levels when pinching.

I can imagine a feature request to allow the slider follow given steps but to show the real paper scale value when set externally.

How the other tools deal with this?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gintarasgraciovas
Comment options

Answer selected by gintarasgraciovas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants