retyui / react-quick-pinch-zoom

A react component that providing multi-touch gestures for zooming and dragging on any DOM element.
https://react-quick-pinch-zoom.netlify.app/
310 stars 47 forks source link

Fix: inconsistent zooms in different screen-sizes #82

Closed Blindman139 closed 1 year ago

Blindman139 commented 1 year ago

Bug: https://github.com/retyui/react-quick-pinch-zoom/issues/58 Demo: https://codesandbox.io/s/react-quick-pinch-fix-58-5wfgm6?file=/src/App.js:927-1635 How to re-create issue:

  1. Open 2 new separate preview windows from above sandbox
  2. Open Developer Tools in only one preview window. This is to change width of view port. Any other means to change view port can be also used.
  3. Toggle value of const doInConsistentZoom = false; near line no-28. a. For const doInConsistentZoom = true; both different sized window will zoom in and align at different points. b. For const doInConsistentZoom = false; both different sized window will zoom in and align at same points.
retyui commented 1 year ago

Released in 5.0.0

diff: 4.9.0...5.0.0