Skip to content

Improved touch interaction on touch-enabled devices

Latest
Compare
Choose a tag to compare
@Mario-Duarte Mario-Duarte released this 08 Aug 22:11
dd67b9f

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

Full Changelog: 1.5.0...1.5.5