Closed danielreuterwall closed 1 year ago
This looks great! I think this is a great idea.
Could you please add a brief comment above the change, and update the README in this PR? Happy to approve and merge if so.
This looks great! I think this is a great idea.
Could you please add a brief comment above the change, and update the README in this PR? Happy to approve and merge if so.
Of course, I'll take care of it next week. Good input 👍
Isn't
disablePanOnInitialZoom
misleading since you can change initalZoom, but this feature always checks forzoomLevel === 1
?
Yeah, it probably is. Maybe something like disablePanOnDefaultZoom
? Or just disablePanOnZoom1
? What do you think?
@elliottkember README updated and code changes commented. What's your input in the prop naming mentioned by @janpe?
Yeah, it probably is. Maybe something like
disablePanOnDefaultZoom
? Or justdisablePanOnZoom1
? What do you think?
Would it be difficult to change the logic to compare to the user selected initial zoom? If the user has set initialZoom to 1.5 it wouldn't make much sense to have this option disable panning at zoomLevel 1. But I guess of those two disablePanOnDefaultZoom
would probably be better.
Yeah, it probably is. Maybe something like
disablePanOnDefaultZoom
? Or justdisablePanOnZoom1
? What do you think?Would it be difficult to change the logic to compare to the user selected initial zoom? If the user has set initialZoom to 1.5 it wouldn't make much sense to have this option disable panning at zoomLevel 1. But I guess of those two
disablePanOnDefaultZoom
would probably be better.
Sound perfectly reasonable, not a difficult change at all. Probably the better choice than renaming the prop.
Would it be difficult to change the logic to compare to the user selected initial zoom? If the user has set initialZoom to 1.5 it wouldn't make much sense to have this option disable panning at zoomLevel 1. But I guess of those two disablePanOnDefaultZoom would probably be better.
Comparing to initialZoom
is a great call. I'd suggest disablePanAtInitialZoom
with at rather than on. The "on" feels like an event listener (onPress), whereas disabling "at" a zoom level feels right to me.
Thank you both for the contribution!!
Yeah, it probably is. Maybe something like
disablePanOnDefaultZoom
? Or justdisablePanOnZoom1
? What do you think?Would it be difficult to change the logic to compare to the user selected initial zoom? If the user has set initialZoom to 1.5 it wouldn't make much sense to have this option disable panning at zoomLevel 1. But I guess of those two
disablePanOnDefaultZoom
would probably be better.Sound perfectly reasonable, not a difficult change at all. Probably the better choice than renaming the prop.
@danielreuterwall when do you think you'll have time to make these changes? 😊
Yeah, it probably is. Maybe something like
disablePanOnDefaultZoom
? Or justdisablePanOnZoom1
? What do you think?Would it be difficult to change the logic to compare to the user selected initial zoom? If the user has set initialZoom to 1.5 it wouldn't make much sense to have this option disable panning at zoomLevel 1. But I guess of those two
disablePanOnDefaultZoom
would probably be better.Sound perfectly reasonable, not a difficult change at all. Probably the better choice than renaming the prop.
@danielreuterwall when do you think you'll have time to make these changes? 😊
Thanks for the reminder :) Just pushed an update.
@elliottkember when do you think this could be merged and released? I'd have use for this feature straight away 😁
guys can you please ship this feature on priority? It would great help.
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.
Added prop,
disablePanOnInitialZoom
, to control if pan is enabled when zoom level is 1. Another take would be to add apanEnabled
prop to control this but I figured as this is a common request, a dedicated prop would be justified.Fixes openspacelabs/react-native-zoomable-view#38