diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/common/Draggable.tsx | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/components/common/Draggable.tsx b/src/components/common/Draggable.tsx index 59ea78f0..64cec7b1 100644 --- a/src/components/common/Draggable.tsx +++ b/src/components/common/Draggable.tsx @@ -77,10 +77,10 @@ export default function Draggable(props: IProps) { animatedViewProps, touchableOpacityProps, onDrag, - onShortPressRelease, + // onShortPressRelease, onDragRelease, - onLongPress, - onPressIn, + // onLongPress, + // onPressIn, onPressOut, onRelease, x, @@ -104,7 +104,8 @@ export default function Draggable(props: IProps) { // Whether we're currently dragging or not const isDragging = React.useRef(false); - const [zIndex, setZIndex] = React.useState(z); + // const [zIndex, setZIndex] = React.useState(z); + const zIndex = z; const getBounds = React.useCallback(() => { const left = x + offsetFromStart.current.x; @@ -148,7 +149,7 @@ export default function Draggable(props: IProps) { ); const onPanResponderGrant = React.useCallback( - (e: GestureResponderEvent, gestureState: PanResponderGestureState) => { + (_: GestureResponderEvent) => { startBounds.current = getBounds(); isDragging.current = true; if (!shouldReverse) { @@ -280,15 +281,15 @@ export default function Draggable(props: IProps) { childSize.current = {x: width, y: height}; }, []); - const handlePressOut = React.useCallback( - (event: GestureResponderEvent) => { - onPressOut(event); - if (!isDragging.current) { - onRelease(event, false); - } - }, - [onPressOut, onRelease], - ); + // const handlePressOut = React.useCallback( + // (event: GestureResponderEvent) => { + // onPressOut(event); + // if (!isDragging.current) { + // onRelease(event, false); + // } + // }, + // [onPressOut, onRelease], + // ); const getDebugView = React.useCallback(() => { const {width, height} = Dimensions.get('window'); |