mirror of https://github.com/tooot-app/app
42 lines
1.6 KiB
Diff
42 lines
1.6 KiB
Diff
diff --git a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts
|
|
index 38fb6f1..e93c288 100644
|
|
--- a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts
|
|
+++ b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts
|
|
@@ -6,6 +6,7 @@ declare type Props = {
|
|
minimumZoomScale?: number;
|
|
maximumZoomScale?: number;
|
|
simultaneousGesture?: GestureType;
|
|
+ isZoomed?: SharedValue<boolean>;
|
|
} & ViewProps;
|
|
export declare function Zoom(props: Props): JSX.Element;
|
|
export {};
|
|
diff --git a/node_modules/react-native-reanimated-zoom/src/zoom.tsx b/node_modules/react-native-reanimated-zoom/src/zoom.tsx
|
|
index e07b415..d57a1eb 100644
|
|
--- a/node_modules/react-native-reanimated-zoom/src/zoom.tsx
|
|
+++ b/node_modules/react-native-reanimated-zoom/src/zoom.tsx
|
|
@@ -7,6 +7,7 @@ import Animated, {
|
|
withTiming,
|
|
cancelAnimation,
|
|
runOnJS,
|
|
+ SharedValue,
|
|
} from 'react-native-reanimated';
|
|
import {
|
|
Gesture,
|
|
@@ -20,6 +21,7 @@ type Props = {
|
|
minimumZoomScale?: number;
|
|
maximumZoomScale?: number;
|
|
simultaneousGesture?: GestureType;
|
|
+ isZoomed?: SharedValue<boolean>;
|
|
} & ViewProps;
|
|
|
|
export function Zoom(props: Props) {
|
|
@@ -39,7 +41,7 @@ export function Zoom(props: Props) {
|
|
const originY = useSharedValue(0);
|
|
const scale = useSharedValue(1);
|
|
const isPinching = useSharedValue(false);
|
|
- const isZoomed = useSharedValue(false);
|
|
+ const isZoomed = props.isZoomed || useSharedValue(false);
|
|
const viewHeight = useSharedValue(0);
|
|
const viewWidth = useSharedValue(0);
|
|
|