Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

ImageZoom move image down and only show a portion #142

Open
emclab opened this issue Jul 19, 2020 · 1 comment
Open

ImageZoom move image down and only show a portion #142

emclab opened this issue Jul 19, 2020 · 1 comment

Comments

@emclab
Copy link

emclab commented Jul 19, 2020

My RN app is 0.62.2, ImageZoom is 2.1.12. The ImageZoom is going to zoom in images presented in Android emulator with FastImage. Here is the code:

      return (
            <ImageZoom  
                        cropWidth={screen_width}   //<<<===full screen width returned by Dimension.get(window).width
                        cropHeight={screen_ht}   //<<<===full screen height returned by Dimension.get(window).height
                        imageWidth={width}
                        imageHeight={ht}
                        enableCenterFocus={false}
                        >
                <FastImage 
                    source={{uri:img_source}} 
                    resizeMode={FastImage.resizeMode.cover} 
                    style={{
                        width:width, 
                        height:ht, 
                        verticalAlign:0,
                        paddingTop:0,
                    }}
                />
            </ImageZoom>
            );

The problem is that the image showed was pushed down half way and only show a portion.
Capture1

But when ImageZoom was removed and only show with FastImage, then the image aligns to the top which is correct. I tried to set enableCenterFocus to false but it didn't help. The same problem exists with <View> of RN.

@emclab
Copy link
Author

emclab commented Jul 19, 2020

More information about the issue is available here

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

No branches or pull requests

1 participant