openspacelabs/react-native-zoomable-view

How to keep to new position of the zoomable view after the pan movement ends?

Closed this issue · 1 comments

Thank you for this great library. I have a question, i would like to be able to drag an image and keep the new positon of the image (inside the boundaries)
here is how I use the component:

	<ReactNativeZoomableView
		ref={zoomableRef}
		maxZoom={1}
	        minZoom={0.3}
		zoomStep={0.1}
		initialZoom={1}
		bindToBorders={true}>					
	<Image source={{ uri: currentQuestion.question_image }} resizeMode='contain' style={{ height: '100%', width: '100%' }} />
	   </ReactNativeZoomableView>

@medmo7 You'll need to use these props

contentWidth={number}
contentHeight={number}

For more details, you can refer to this example https://github.com/openspacelabs/react-native-zoomable-view#example