Zoom out shows the wrong percentage on the minimap. #2669
-
IntroductionI'm experiencing an issue related to zooming out in my app. The same issue can be observed in this demo: When zooming out the graph, it sometimes shows duplicate zoom percentages such as 20%, 30%, or 40%. Is there any way to fix this? Steps to reproduce
Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS, JointJS+ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It happens because we use simply an inputEl.step = 20;
inputEl.value = 99;
inputEl.value; // => '100' The range can show You can change the {
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. 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? |
Beta Was this translation helpful? Give feedback.
It happens because we use simply an
<input type="range"/>
with astep
attribute set to20
by default.The range can show
100
when the paper scale is set to0.99
.You can change the
step
to1
to overcome this.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?