Fix tall image lightbox on Android (#4393)
This commit is contained in:
		
							parent
							
								
									3801932902
								
							
						
					
					
						commit
						559764156d
					
				
					 1 changed files with 14 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -1,30 +1,36 @@
 | 
			
		|||
import React, {useState} from 'react'
 | 
			
		||||
 | 
			
		||||
import {ActivityIndicator, Dimensions, StyleSheet} from 'react-native'
 | 
			
		||||
import {Image} from 'expo-image'
 | 
			
		||||
import {Gesture, GestureDetector} from 'react-native-gesture-handler'
 | 
			
		||||
import Animated, {
 | 
			
		||||
  runOnJS,
 | 
			
		||||
  useAnimatedReaction,
 | 
			
		||||
  useAnimatedRef,
 | 
			
		||||
  useAnimatedStyle,
 | 
			
		||||
  useAnimatedReaction,
 | 
			
		||||
  useSharedValue,
 | 
			
		||||
  withDecay,
 | 
			
		||||
  withSpring,
 | 
			
		||||
} from 'react-native-reanimated'
 | 
			
		||||
import {GestureDetector, Gesture} from 'react-native-gesture-handler'
 | 
			
		||||
import {Image} from 'expo-image'
 | 
			
		||||
 | 
			
		||||
import type {Dimensions as ImageDimensions, ImageSource} from '../../@types'
 | 
			
		||||
import useImageDimensions from '../../hooks/useImageDimensions'
 | 
			
		||||
import {
 | 
			
		||||
  createTransform,
 | 
			
		||||
  readTransform,
 | 
			
		||||
  applyRounding,
 | 
			
		||||
  createTransform,
 | 
			
		||||
  prependPan,
 | 
			
		||||
  prependPinch,
 | 
			
		||||
  prependTransform,
 | 
			
		||||
  readTransform,
 | 
			
		||||
  TransformMatrix,
 | 
			
		||||
} from '../../transforms'
 | 
			
		||||
import type {ImageSource, Dimensions as ImageDimensions} from '../../@types'
 | 
			
		||||
 | 
			
		||||
const SCREEN = Dimensions.get('window')
 | 
			
		||||
const windowDim = Dimensions.get('window')
 | 
			
		||||
const screenDim = Dimensions.get('screen')
 | 
			
		||||
const statusBarHeight = windowDim.height - screenDim.height
 | 
			
		||||
const SCREEN = {
 | 
			
		||||
  width: windowDim.width,
 | 
			
		||||
  height: windowDim.height + statusBarHeight,
 | 
			
		||||
}
 | 
			
		||||
const MIN_DOUBLE_TAP_SCALE = 2
 | 
			
		||||
const MAX_ORIGINAL_IMAGE_ZOOM = 2
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue