-
Notifications
You must be signed in to change notification settings - Fork 61
Description
`js
const [scrollEnabled, setScrollEnabled] = useState(true);
const execAfterZoom = () =>
scrollViewRef &&
zoomableViewRef &&
setScrollEnabled(zoomableViewRef.current?.zoomLevel < 1.01);
<ScrollView
style={styles.scrollContainer}
scrollEnabled={scrollEnabled}
contentContainerStyle={{ padding: 0 }}
>
<ReactNativeZoomableView
zoomEnabled={true}
maxZoom={3}
minZoom={1}
ref={zoomableViewRef}
onZoomAfter={execAfterZoom}
onShiftingEnd={execAfterZoom}
disablePanOnInitialZoom
style={{ alignSelf: "flex-start" }}
>
{props.md}
`
I used a ReactNativeZoomableView inside a Scrollview in order to have my long markdown Text scrollable and zoomable but the scrolling only works when I move my finger very fast.
Is this expected behaviour?
Can I fix this so that scrolling and zooming work independently handlet by their respective components?