Skip to content

Zoom + Scrollview only works when scrolling fast. #142

@RP1-MVac

Description

@RP1-MVac

`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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions