IjzerenHein / react-navigation-shared-element

React Navigation bindings for react-native-shared-element 💫
https://github.com/IjzerenHein/react-native-shared-element
MIT License
1.27k stars 124 forks source link

[v5]/[v3] Random endnode position with react-native-image-zoom-viewer #141

Open xmflsct opened 3 years ago

xmflsct commented 3 years ago

https://user-images.githubusercontent.com/292204/106319695-1bf88e00-6272-11eb-80d1-076bb82b1ae9.mov

See attached screen recording in a simulator. I could not figure out how to debug, and why this would happen.

This is my code for react-native-image-zoom-viewer.

      <ImageViewer
        index={initialIndex}
        imageUrls={imageUrls}
        pageAnimateTime={250}
        enableSwipeDown
        useNativeDriver
        swipeDownThreshold={100}
        renderIndicator={() => <></>}
        saveToLocalByLongPress={false}
        onSwipeDown={() => navigation.goBack()}
        style={{ flex: 1 }}
        onChange={index => index !== undefined && setCurrentIndex(index)}
        renderImage={prop => (
          <SharedElement id={`image.${imageUrls[imageIndex].url}`}>
            <FastImage
              {...prop}
              resizeMode={'contain'}
            />
          </SharedElement>
        )}
      />

This is the component within the Stack.Screen. Any suggestions?