diff --git a/example/App.tsx b/example/App.tsx index 30344be..4bf694a 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useRef, useState } from 'react'; import { View, Text, Image, Animated, Button } from 'react-native'; -// @ts-ignore + import { ReactNativeZoomableView } from '@openspacelabs/react-native-zoomable-view'; import { styles } from './style'; import { debounce } from 'lodash'; @@ -33,16 +33,18 @@ export default function App() { [] )(); - const staticPinPosition = size - ? { x: size.width / 2, y: size.height / 2 } - : undefined; - + const staticPinPosition = { x: size.width / 2, y: size.height / 2 }; const { size: contentSize } = applyContainResizeMode(imageSize, size); return ( ReactNativeZoomableView - setSize(e.nativeEvent.layout)}> + { + setSize(e.nativeEvent.layout); + }} + > onStaticPinPositionMove: {stringifyPoint(movePin)}