Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

bindToBorder Doesn't work. #78

Open
mahiraltinkaya opened this issue Jul 15, 2021 · 4 comments
Open

bindToBorder Doesn't work. #78

mahiraltinkaya opened this issue Jul 15, 2021 · 4 comments

Comments

@mahiraltinkaya
Copy link

Hello there;
I tried to explain with pictures and I show the styles clearly. I expect the image to stay in the layout, but the image gets bigger as possible.

Can you help me where am I going wrong?
WhatsApp Image 2021-07-16 at 00 07 42 (2)
WhatsApp Image 2021-07-16 at 00 07 42 (1)
WhatsApp Image 2021-07-16 at 00 07 42

  return (
    <Layout
      style={[
        {
          flex: 1,
          backgroundColor: "black",
          flexDirection: "column",
          width: MAX_WIDTH,
        },
      ]}
    >
      <Layout style={{ width: 350, height: 350 }}>
        <ReactNativeZoomableView
          ref={zoomBottom}
          maxZoom={1.3}
          minZoom={1}
          zoomEnabled={true}
          movementSensibility={3}
          initialZoom={1}
          bindToBorders={true}
          //   onZoomAfter={logOutZoomStateBottom}
          style={{ width: 350, height: 350, padding: 10 }}
        >
          <Image
            source={props.original}
            style={{ width: 320, height: 320 }}
            resizeMode="contain"
          ></Image>
        </ReactNativeZoomableView>
      </Layout>
      <Layout
        style={{
          flex: 1,
          width: MAX_WIDTH,
          backgroundColor: "black",
        }}
      ></Layout>
    </Layout>
  );

@tallesb
Copy link

tallesb commented Jul 22, 2021

Same issue. Any solution?

@n-ext
Copy link

n-ext commented Jul 23, 2021

Try adding overflow: 'hidden' to your Layout containing ReactNativeZoomableView

@tallesb
Copy link

tallesb commented Jul 23, 2021

Try adding overflow: 'hidden' to your Layout containing ReactNativeZoomableView

Thanks! This solution worked for me!

@mahiraltinkaya
Copy link
Author

Try adding overflow: 'hidden' to your Layout containing ReactNativeZoomableView

Thank you mate. this worked for me!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants