Closed rektdeckard closed 2 years ago
It can be done on your side, just ignore onUpdate
export const App = () => {
const [enabled, setEnabled] = useState(true);
return (
<QuickPinchZoom onUpdate={enabled ? onUpdate: null}> // It should helps
<img ref={imgRef} src={IMG_URL} />
</QuickPinchZoom>
);
};
Hey there, thanks for making this library!
I would like to be able to dynamically
enable
or disable the pan/zoom in order to interact with some child components that require drag interaction (<input type="range" />
), however children do not seem to receive drag events when theenabled
prop isfalse
. I would expect that this should work, and that events would propagate normally when disabled.Example is contrived of course, and my real input is deeply nested in a child, but either way is impossible to interact with any element via drag if they are within the
QuickPinchZoom
, whether it's enabled or not.