@@ -76,6 +76,10 @@ export const createSheetGesture = (
7676 { offset : 0 , maxHeight : '100%' } ,
7777 { offset : 1 , maxHeight : '0%' } ,
7878 ] ,
79+ FOOTER_KEYFRAMES : [
80+ { offset : 0 , transform : `translateY(0)` } ,
81+ { offset : 1 , transform : `translateY(-${ wrapperEl . clientHeight } px)` } ,
82+ ] ,
7983 } ;
8084
8185 const contentEl = baseEl . querySelector ( 'ion-content' ) ;
@@ -89,6 +93,7 @@ export const createSheetGesture = (
8993 const wrapperAnimation = animation . childAnimations . find ( ( ani ) => ani . id === 'wrapperAnimation' ) ;
9094 const backdropAnimation = animation . childAnimations . find ( ( ani ) => ani . id === 'backdropAnimation' ) ;
9195 const contentAnimation = animation . childAnimations . find ( ( ani ) => ani . id === 'contentAnimation' ) ;
96+ const footerAnimation = animation . childAnimations . find ( ( ani ) => ani . id === 'footerAnimation' ) ;
9297
9398 const enableBackdrop = ( ) => {
9499 baseEl . style . setProperty ( 'pointer-events' , 'auto' ) ;
@@ -128,6 +133,8 @@ export const createSheetGesture = (
128133 wrapperAnimation . keyframes ( [ ...SheetDefaults . WRAPPER_KEYFRAMES ] ) ;
129134 backdropAnimation . keyframes ( [ ...SheetDefaults . BACKDROP_KEYFRAMES ] ) ;
130135 contentAnimation ?. keyframes ( [ ...SheetDefaults . CONTENT_KEYFRAMES ] ) ;
136+ footerAnimation ?. keyframes ( [ ...SheetDefaults . FOOTER_KEYFRAMES ] ) ;
137+
131138 animation . progressStart ( true , 1 - currentBreakpoint ) ;
132139
133140 /**
@@ -338,7 +345,7 @@ export const createSheetGesture = (
338345 } ,
339346 ] ) ;
340347
341- if ( contentAnimation ) {
348+ if ( contentAnimation && footerAnimation ) {
342349 /**
343350 * The modal content should scroll at any breakpoint when scrollAtEdge
344351 * is disabled. In order to do this, the content needs to be completely
@@ -350,6 +357,11 @@ export const createSheetGesture = (
350357 { offset : 0 , maxHeight : `${ ( 1 - breakpointOffset ) * 100 } %` } ,
351358 { offset : 1 , maxHeight : `${ snapToBreakpoint * 100 } %` } ,
352359 ] ) ;
360+
361+ footerAnimation . keyframes ( [
362+ { offset : 0 , transform : `translateY(-${ height * ( breakpointOffset ) } px)` } ,
363+ { offset : 1 , transform : `translateY(-${ height * ( 1 - snapToBreakpoint ) } px)` } ,
364+ ] )
353365 }
354366
355367 animation . progressStep ( 0 ) ;
@@ -396,6 +408,7 @@ export const createSheetGesture = (
396408 wrapperAnimation . keyframes ( [ ...SheetDefaults . WRAPPER_KEYFRAMES ] ) ;
397409 backdropAnimation . keyframes ( [ ...SheetDefaults . BACKDROP_KEYFRAMES ] ) ;
398410 contentAnimation ?. keyframes ( [ ...SheetDefaults . CONTENT_KEYFRAMES ] ) ;
411+ footerAnimation ?. keyframes ( [ ...SheetDefaults . FOOTER_KEYFRAMES ] ) ;
399412 animation . progressStart ( true , 1 - snapToBreakpoint ) ;
400413 currentBreakpoint = snapToBreakpoint ;
401414 onBreakpointChange ( currentBreakpoint ) ;
0 commit comments