alwx / react-native-photo-view

Pinch-to-zoom view for React Native (both iOS and Android)
MIT License
815 stars 434 forks source link

The background moves when zooming fast #116

Open luqiuyuan opened 7 years ago

luqiuyuan commented 7 years ago

Hi, I am not sure whether this behaviour is intended or not. Please see below the screenshot. When zooming fast, the entire background moves and shows the white background under the PhotoView (note the white margin in the GIF picture below).

2017-09-30 11_16_40

Following is my codes

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  View
} from 'react-native';
import PhotoView from 'react-native-photo-view';

export default class testPV extends Component {
  render() {
    return (
      <View style={styles.container}>
        <PhotoView
          source={require('./img/4.jpg')}
          minimumZoomScale={0.8}
          maximumZoomScale={3}
          androidScaleType="center"
          onLoad={() => console.log("Image loaded!")}
          style={{alignSelf:'stretch', flex:1}} />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
});

AppRegistry.registerComponent('testPV', () => testPV);

I am using a real device (iPhone 7 running iOS 10.3.3). The react native is 0.46.4. react-native-photo-view is 1.5.2

frameworktechnology commented 6 years ago

@luqiuyuan Hey I have the same problem. Did you find solution yet? Thanks

baotoan1905 commented 5 years ago

Same issue :(