Open DroneKid opened 7 years ago
Post your code so we can see
import React, { Component } from 'react';
import {
View,
Text,
Image,
Dimensions,
} from 'react-native';
import ViewEditor from 'react-native-view-editor';
const { width, height } = Dimensions.get('window');
const uri = 'https://res.cloudinary.com/dtihkk6cr/image/upload/'
+ 'v1481234249/permission_form_page_1_hqx6to.png';
const imgWidth = 773;
const imgHeight = 1000;
console.log(width, height);
export default class App extends Component {
render() {
return (
<ViewEditor
imageWidth={imgWidth}
imageHeight={imgHeight}
imageContainerWidth={width}
imageContainerHeight={height}
>
{() => (
<Image
style={{ position: 'relative', width: imgWidth, height: imgHeight }}
source={{ uri }}
>
</Image>
)}
</ViewEditor>
);
}
}
Hi!
I'm trying to pan and zoom big image (1000x1000). So I set imageWidth & imageHeight to 1000 and imageContainer sizes to the
Dimensions
values. It pans ok, but pinch-zooming is funky. on iOs it just pans and does not zoom, on Android it crops the image to the container size.Could you please advise if I'm doing anything wrong?
Thanks, A.