ascoders / react-native-image-zoom

react native image pan and zoom
MIT License
639 stars 282 forks source link

How do i access the methods like reset , resetScale & centerOn #78

Closed Yasernova closed 5 years ago

ascoders commented 5 years ago

Use href

DanthonyPabon commented 5 years ago

I hope you find it useful

        <ImageZoom
          ref={ref => (this.ImageZoom = ref)}
          cropWidth={WidthG}
          cropHeight={this.state.height}
          imageWidth={WidthG}
          imageHeight={this.state.height}
          pinchToZoom={true}
          responderRelease={() => {
            this.ImageZoom.reset();
          }}
        >
          <FastImage
            style={{
              flex: 1,
              height: this.state.height,
              width: WidthG
            }}
            source={{
              uri: this.state.image
            }}
            resizeMode={FastImage.resizeMode.contain}
          />
        </ImageZoom>