Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Bucci83 opened this issue Jul 6, 2024 · 3 comments
Open

Comments

@Bucci83
Copy link

Bucci83 commented Jul 6, 2024

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!
@mburakdndr
Copy link

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"
/>

@Bucci83
Copy link
Author

Bucci83 commented Sep 24, 2024

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

@badalsaibo
Copy link

@Bucci83 Which library you used?

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

No branches or pull requests

3 participants