react-native-image-zoom icon indicating copy to clipboard operation
react-native-image-zoom copied to clipboard

Zoom works but the zoomed image renders under all the components below

Open Bucci83 opened this issue 1 year ago • 2 comments

I have a problem, once I zoom on the image , the image is correctly zoomed on top of the above components, but is rendered UNDER the below components... this is inside a chat here is the code snippet

            <View>
              {message.Desc === '' ? (
                <View style={{ zIndex: 10 }}>
                  <ImageZoom
                    uri={`${REACT_APP_API_URL}${
                      message?.Path ? message?.Path : message?.path
                    }`}
                    minScale={0.5}
                    maxScale={5}
                    doubleTapScale={3}
                    isDoubleTapEnabled
                    style={styles.imageStyle}
                    resizeMode="cover"
                  />
                </View>
              ) : (
                <View style={{ zIndex: -10 }}>
                  <Text style={styles.message} selectable>
                    {message.Desc}
                  </Text>
                </View>
              )}
            </View>
            <View style={styles.triangle_shape_right} />
            <Text style={styles.time} selectable={true}>
              {message.NameEmp} - {message_time_convert(message.Date)}
            </Text>
          </View>```

as you can see I tried to add zIndex with no luck... am I missing something ?

thanks!

Bucci83 avatar Jul 06 '24 16:07 Bucci83

I was having the same problem, I solved the problem with flex: 1. Maybe it will help you my friend.

<View style={{ zIndex: 10, flex:1}}> <ImageZoom uri={${REACT_APP_API_URL}${ message?.Path ? message?.Path : message?.path }} minScale={0.5} maxScale={5} doubleTapScale={3} isDoubleTapEnabled style={styles.imageStyle} resizeMode="cover" /> </View>

mburakdndr avatar Aug 01 '24 13:08 mburakdndr

thanks, no luck.. I ended up changing the library to another

Bucci83 avatar Sep 24 '24 23:09 Bucci83

@Bucci83 Which library you used?

badalsaibo avatar Oct 29 '24 08:10 badalsaibo

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Dec 28 '24 18:12 github-actions[bot]

This issue was closed because it has been stalled for 15 days with no activity.

github-actions[bot] avatar Jan 13 '25 18:01 github-actions[bot]