File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import React from 'react'
44import {
55 Animated ,
6+ Platform ,
67 StatusBar ,
78 StyleSheet ,
89 Dimensions ,
@@ -75,6 +76,14 @@ class ImagePaner extends React.PureComponent<Props> {
7576 }
7677
7778 _onLoad = ( ) => {
79+ if ( Platform . OS === 'android' ) {
80+ this . _scroll &&
81+ this . _scroll . scrollTo ( {
82+ x : - this . props . zoomedImageMeasurements . x ,
83+ y : 0 ,
84+ animated : false
85+ } )
86+ }
7887 Animated . timing ( this . _buttonOpacity , {
7988 toValue : 1 ,
8089 duration : 1000 ,
@@ -90,11 +99,13 @@ class ImagePaner extends React.PureComponent<Props> {
9099 if ( ref ) {
91100 this . _scroll = ref . getNode ( )
92101 if ( this . props . enableTilt === false ) {
93- this . _scroll . scrollTo ( {
94- x : - this . props . zoomedImageMeasurements . x ,
95- y : 0 ,
96- animated : false
97- } )
102+ if ( Platform . OS === 'ios' ) {
103+ this . _scroll . scrollTo ( {
104+ x : - this . props . zoomedImageMeasurements . x ,
105+ y : 0 ,
106+ animated : false
107+ } )
108+ }
98109 }
99110 }
100111 }
You can’t perform that action at this time.
0 commit comments