react-prismazoom
react-prismazoom copied to clipboard
Added prop and modification to allow parent movement
Problem: When the prismazoom element was on the page, you couldn't use single finger panning to move the page around on mobile. This created some issues for a project I was working on where the primsmazoom element was 100% of the view width, making it impossible to scroll past it.
Solution: When zoom is set to 1 (aka not zoomed in) and when a prop has been set to true, sets the touch actions as pan-x pan-y. This will allow the touch event to propagate out from the component and keep panning, allowing elements to scroll either inside of their parents or inside the browser itself.
I haven't tested how effective this is on every browser/edge case, but for the app I am working on this has worked perfectly.