Closed sebasptsch closed 2 years ago
Yes this feature would be great, plus a follow up question: Is there some way to disable panning at all?
Request feature as well. This library solves html rendering zoom for images. The ability to disable pan at initial zoom is needed.
I've made a fork to implement this. It seems to work ok, cdf1b1c47017e37951b63f29674df8b5b1c89fc1? Can make a pull request, what do you think?
Hoping to see this feature as well. @danielreuterwall maybe you should go ahead and open the pull request to get this moving?
@danielreuterwall or maybe it could be just a panEnabled
(default true) prop where you can determine yourself when it should be enabled or disabled. Similar to zoomEnabled
on react-native-pager-view
which was mentioned in the initial message of this issue.
I agree, having a panEnabled
is a more flexible solution. Although this feels like a very common requirement that is could justify a dedicated prop. I'll try to fix a PR this week.
I agree, having a
panEnabled
is a more flexible solution. Although this feels like a very common requirement that is could justify a dedicated prop. I'll try to fix a PR this week.
Thanks for taking a look!
Hi again @danielreuterwall! Do you have an idea when you might have time to continue this one?
Just added a PR for the fix I made. Haven't continued with the panEnabled
prop but that would be a natural continuation.
would someone be kind enough to approve this??
is there any way to disable panning beyond edges also when zooming ? I am using disablePanOnInitialZoom but I want this behavior also when I zoom and get to edge of image.
It should be possible to disable panning when the image has not yet been zoomed into. This is useful when using with libraries like 'react-native-pager-view'