diff --git a/Draggable.tsx b/Draggable.tsx index 363ab4a..3737040 100644 --- a/Draggable.tsx +++ b/Draggable.tsx @@ -40,7 +40,7 @@ interface IProps { touchableOpacityProps?: object; onDrag?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void; onShortPressRelease?: (event: GestureResponderEvent) => void; - onDragRelease?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void; + onDragRelease?: (e: GestureResponderEvent, gestureState: PanResponderGestureState, bounds:{left: number, top: number, right: number, bottom: number}) => void; onLongPress?: (event: GestureResponderEvent) => void; onPressIn?: (event: GestureResponderEvent) => void; onPressOut?: (event: GestureResponderEvent) => void; @@ -125,7 +125,7 @@ export default function Draggable(props: IProps) { (e: GestureResponderEvent, gestureState: PanResponderGestureState) => { isDragging.current = false; if (onDragRelease) { - onDragRelease(e, gestureState); + onDragRelease(e, gestureState, getBounds()) onRelease(e, true); } if (!shouldReverse) {