BetterTyped/react-zoom-pan-pinch

minScale bound not work correctly when zoom out with ctrl

AnnaLysiuk opened this issue · 2 comments

When setting minScale for TransformWrapper and trying to zoom out using ctrl button + mouse wheel unexpected behaviour happen (zoom out more than set value and go back to minScale).

Steps to reproduce the behaviour:

  1. Implement Transform Wrapper with minScale value set
  2. Try to zoom out using ctrl + mouse

Expected behaviour
elements are not zoom out more than set minScale value as it works e.g while using cmd + wheel

Screen.Recording.2023-11-22.at.09.29.13.mov

Hi @AnnaLysiuk ,
I'm facing this issue as well on my project. I solved the problem by disabling the zoomAnimation

<TransformWrapper
  zoomAnimation={{ disabled: true }}
  minScale={0.1}
  limitToBounds={false}
  // ...other props
/>