From 93755326985dddeb34d4fc0a4a9755d3a9860be1 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 1 Dec 2023 00:02:46 +0000 Subject: Add enter/exit animations to modals on web (#2042) * add reanimated layout animations to modals * reorder imports * pass context to scroll handler patches --- .../hooks/useAnimatedScrollHandler_FIXED.web.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts') diff --git a/src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts b/src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts index 131e7bdd7..98e05a8ce 100644 --- a/src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts +++ b/src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts @@ -11,31 +11,31 @@ export const useAnimatedScrollHandler: typeof useAnimatedScrollHandler_BUGGY = ( }) return useAnimatedScrollHandler_BUGGY( { - onBeginDrag(e) { + onBeginDrag(e, ctx) { if (typeof ref.current !== 'function' && ref.current.onBeginDrag) { - ref.current.onBeginDrag(e) + ref.current.onBeginDrag(e, ctx) } }, - onEndDrag(e) { + onEndDrag(e, ctx) { if (typeof ref.current !== 'function' && ref.current.onEndDrag) { - ref.current.onEndDrag(e) + ref.current.onEndDrag(e, ctx) } }, - onMomentumBegin(e) { + onMomentumBegin(e, ctx) { if (typeof ref.current !== 'function' && ref.current.onMomentumBegin) { - ref.current.onMomentumBegin(e) + ref.current.onMomentumBegin(e, ctx) } }, - onMomentumEnd(e) { + onMomentumEnd(e, ctx) { if (typeof ref.current !== 'function' && ref.current.onMomentumEnd) { - ref.current.onMomentumEnd(e) + ref.current.onMomentumEnd(e, ctx) } }, - onScroll(e) { + onScroll(e, ctx) { if (typeof ref.current === 'function') { - ref.current(e) + ref.current(e, ctx) } else if (ref.current.onScroll) { - ref.current.onScroll(e) + ref.current.onScroll(e, ctx) } }, }, -- cgit 1.4.1