Hi friends,
thanks for this npm, is amazing. The bad news is when the react-native-svg-pan-zoom
is wrapped with another component than View, by example react-native-modal, the zoom and drag is disabled, but the events click work even.
This is an example
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View,
ImageBackground, Dimensions} from 'react-native';
import { Svg, Rect, Circle, Image, Polyline, Path, G } from 'react-native-svg';
import Modal from "react-native-modal";
import SvgPanZoom, { SvgPanZoomElement } from 'react-native-svg-pan-zoom';
Hi friends, thanks for this npm, is amazing. The bad news is when the react-native-svg-pan-zoom is wrapped with another component than View, by example react-native-modal, the zoom and drag is disabled, but the events click work even.
This is an example
import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View, ImageBackground, Dimensions} from 'react-native'; import { Svg, Rect, Circle, Image, Polyline, Path, G } from 'react-native-svg'; import Modal from "react-native-modal"; import SvgPanZoom, { SvgPanZoomElement } from 'react-native-svg-pan-zoom';
const width = Dimensions.get('window').width const height = Dimensions.get('window').height
const WIDTH = 1500 const HEIGHT = 2500 type Props = {}; export default class App extends Component {
constructor(props) {
super(props);
this.state = {
tree_maxWidth:width6,
tree_maxHeight:height7
}
}
render() { return ( <Modal
} }
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, }, });
Best regards.