DuDigital/react-native-zoomable-view

Initial zoom value and pinch to zoom bug

Opened this issue · 1 comments

Found this bug when your initialZoom value is less than 1

The bug causes the zoom value to 1 during the first pinch gesture. In ReactNativeZoomableView.js fie in Line 32 you need to update as below

this.state = {
zoomLevel: props.initialZoom,
...initialState,
lastZoomLevel:props.initialZoom ? props.initialZoom : 1,
offsetX: props.initialOffsetX,
offsetY: props.initialOffsetY,
};

@HarryCamigla sorry for taking so long to respond to this.
I could not reproduce this with the latest version. Could you maybe check if the problem still persists?
If yes: please provide a small example of the way you implement the component.
Do you have minZoom set to a number smaller than your intiialZoom ?