ascoders / react-native-image-zoom

react native image pan and zoom
MIT License
639 stars 282 forks source link

handleLayout need to check height change, otherwise it is not working properly on iPad rotation #162

Open simonxcheng opened 3 years ago

simonxcheng commented 3 years ago

Hi, the handleLayout function needs to check height change, otherwise it is not working on iPad rotation. Please add following change to that function:

if (event.nativeEvent.layout.width !== this.width || event.nativeEvent.layout.height !== this.height) { .... }

Thanks, SXC