Open maxkemzi opened 1 year ago
Also having the same issue.
Having the same issue, did you find anything useful? @nicholas-patterson @Kemzi-coder
@thomasttvo can you provide any input on this?
I am running into this issue when having two zoomable views side-by-side. Has anyone found a solution or workaround?
@thomasttvo
@20chad16 you need to disable panning from the node_module.
@DLkhazan Can you elaborate? I'm running at the issue, and I'm not an expert with animation.
@c00ler82 I can provide you the file. Navigate to APP_FOLDER/node_modules/@openspacelabs/react-native-zoomable-view/src/ReactNativeZoomableView.tsx. And replace it with the attached file.
I made multiple changes to the file but I think the one you required will be achieved by modifying _handleShifting function. You can compare the library and modified function from the file. had to compress it, because they won't let me post it in original formate. But let me know if you need my help to understand it. zoomableview.zip
Yeah probably _handleShifting what I was missing. Thank you @DLkhazan. Worked like a charm.
When using the zoomTo method or double-tapping with doubleTapZoomToCenter prop set to true, the ZoomableView zooms to the upper left corner instead of the center of the View. Because of this, the animation is jumping during the resetting of the zoom level if the bindToBorders prop is set to true.
react: 18.1.0 react-native: 0.70.5 @openspacelabs/react-native-zoomable-view: 2.1.1
Video: https://user-images.githubusercontent.com/70598945/209668428-447dcd04-4bb6-4428-9aeb-e4b8bbd9bdc3.mp4