-
Notifications
You must be signed in to change notification settings - Fork 33
Description
I am using React-native-photo-view-ex for resizing the images with a pinch for picture editing. when I resize the image the flex-box size does not change with the image size and when I added a new item for example text or image the previously resized image flex-box focused and resized the flex-box size and the position of the image will be changed. Here is my code
{imageArray &&
imageArray.map((item, index) => {
return (
<component.PinchZoomView
minScale={0.1}
maxScale={5}
scale={item.scale}
translateX={item.translateX}
translateY={item.translateY}
data={value =>
modifyValues(value, item.layer, item.key)
}
key={index}
style={[
styles.pinchImagePosition,
{
zIndex: item.key,
},
]}>
<PhotoView
source={{uri: item.editImage}}
key={index}
minimumZoomScale={0.1}
maximumZoomScale={5}
onScale={e =>
modifyScaling(e.nativeEvent, item.layer)
}
resizeMode="contain"
style={[styles.resizeImageWrapper]}
/>
</component.PinchZoomView>
);
})}