This pull request introduces improved touch interaction for zooming images on touch-enabled devices, specifically making zoom and drag actions more intuitive and preventing unwanted zoom activation during multi-finger gestures. The update also documents these changes and bumps the package version to 1.5.5.
Touch interaction improvements:
Single-finger touch now activates zoom and allows dragging the zoomed image, while multi-finger touches will not activate zoom, allowing normal page scrolling instead. (src/react-image-zooom.tsx, lib/react-image-zooom.js) [1] [2] [3] [4]
Prevents body scroll only when zoom is active and a single finger is used, avoiding interference with multi-touch gestures. (src/hooks/usePreventBodyScroll.ts, lib/react-image-zooom.js) [1] [2]
Documentation and versioning:
Added documentation in README.md describing the new touch behavior for version 1.5.5.
Updated package.json to version 1.5.5.
What's Changed
- Feat - Improved mobile interaction and scroll detection by @Mario-Duarte in #22
- Release - V1.5.5 by @Mario-Duarte in #23
Full Changelog: 1.5.0...1.5.5