react-native-image-view icon indicating copy to clipboard operation
react-native-image-view copied to clipboard

fix jump on first press

Open davidbiller opened this issue 6 years ago • 4 comments

davidbiller avatar Dec 08 '18 19:12 davidbiller

Hey @davidbiller, many thanks for PR. I've checked new behaviour with changes you made. I looks like it fixes scrolling issue, but from other hand breaks vertical moving of picture. I now looking for solution to fix both problems (maybe some big changes needed).

antonKalinin avatar Dec 09 '18 14:12 antonKalinin

So can you explain what do you mean? i can move the image in both directions...

davidbiller avatar Dec 09 '18 15:12 davidbiller

I cant move image up or down. If I swipe fast image view will close, but if vertical velocity is low, then image doesn't moving.

antonKalinin avatar Dec 09 '18 15:12 antonKalinin

The real solution is to add this as the bottom of the constructor:

        this.state.imageTranslate = { x, y };
        this.state.imageScale = this.getInitialScale();

danielgindi avatar Aug 19 '19 12:08 danielgindi