Fix tall image lightbox on Android (#4393)
parent
3801932902
commit
559764156d
|
@ -1,30 +1,36 @@
|
||||||
import React, {useState} from 'react'
|
import React, {useState} from 'react'
|
||||||
|
|
||||||
import {ActivityIndicator, Dimensions, StyleSheet} from 'react-native'
|
import {ActivityIndicator, Dimensions, StyleSheet} from 'react-native'
|
||||||
import {Image} from 'expo-image'
|
import {Gesture, GestureDetector} from 'react-native-gesture-handler'
|
||||||
import Animated, {
|
import Animated, {
|
||||||
runOnJS,
|
runOnJS,
|
||||||
|
useAnimatedReaction,
|
||||||
useAnimatedRef,
|
useAnimatedRef,
|
||||||
useAnimatedStyle,
|
useAnimatedStyle,
|
||||||
useAnimatedReaction,
|
|
||||||
useSharedValue,
|
useSharedValue,
|
||||||
withDecay,
|
withDecay,
|
||||||
withSpring,
|
withSpring,
|
||||||
} from 'react-native-reanimated'
|
} 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 useImageDimensions from '../../hooks/useImageDimensions'
|
||||||
import {
|
import {
|
||||||
createTransform,
|
|
||||||
readTransform,
|
|
||||||
applyRounding,
|
applyRounding,
|
||||||
|
createTransform,
|
||||||
prependPan,
|
prependPan,
|
||||||
prependPinch,
|
prependPinch,
|
||||||
prependTransform,
|
prependTransform,
|
||||||
|
readTransform,
|
||||||
TransformMatrix,
|
TransformMatrix,
|
||||||
} from '../../transforms'
|
} 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 MIN_DOUBLE_TAP_SCALE = 2
|
||||||
const MAX_ORIGINAL_IMAGE_ZOOM = 2
|
const MAX_ORIGINAL_IMAGE_ZOOM = 2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue