ascoders / react-native-image-zoom

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

Resetting image position after zooming out on corner #143

Closed heondo closed 4 years ago

heondo commented 4 years ago

weird-behavior

The library is great, exactly what I have needed so far except for this behavior when I zoom out after viewing a corner zoomed in.

When I zoom out, my image is in a weird position and requires me to pan the image to reset it. Any ideas what I may be doing wrong?

      <ImageZoom
        cropWidth={deviceWidth}
        cropHeight={deviceHeight}
        imageWidth={deviceWidth}
        imageHeight={deviceHeight}
        minScale={1}
        maxScale={3}>
        <Svg height="100%" width="100%">
          <G>
            <Image
              width="100%"
              height="100%"
              preserveAspectRatio="xMidYMid"
              href={require('../../../shared/images/depth-images/front-core.png')}
              clipPath="url(#clip)"
            />
          </G>
        </Svg>
      </ImageZoom>
heondo commented 4 years ago

Sorry, just buggy* on emulators.