Skip to content

Commit

Permalink
chore: ran build
Browse files Browse the repository at this point in the history
  • Loading branch information
kumibrr committed Dec 26, 2024
1 parent 4970471 commit 95c5314
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ ion-modal,prop,leaveAnimation,((baseEl: any, opts?: any) => Animation) | undefin
ion-modal,prop,mode,"ios" | "md",undefined,false,false
ion-modal,prop,presentingElement,HTMLElement | undefined,undefined,false,false
ion-modal,prop,showBackdrop,boolean,true,false,false
ion-modal,prop,snapBreakpoints,number[] | undefined,undefined,false,false
ion-modal,prop,trigger,string | undefined,undefined,false,false
ion-modal,method,dismiss,dismiss(data?: any, role?: string) => Promise<boolean>
ion-modal,method,getCurrentBreakpoint,getCurrentBreakpoint() => Promise<number | undefined>
Expand Down
18 changes: 11 additions & 7 deletions core/src/components/modal/gestures/sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const createSheetGesture = (
BACKDROP_KEYFRAMES: backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop,
CONTENT_KEYFRAMES: [
{ offset: 0, maxHeight: '100%' },
{ offset: 1, maxHeight: '0%'},
{ offset: 1, maxHeight: '0%' },
],
};

Expand All @@ -91,11 +91,12 @@ export const createSheetGesture = (
const backdropAnimation = animation.childAnimations.find((ani) => ani.id === 'backdropAnimation');
let contentAnimation: Animation | undefined;
if (snapBreakpoints.length > 0) {
contentAnimation =
animation.addAnimation(
createAnimation('contentAnimation')
.addElement(contentEl!.parentElement!)
.keyframes(SheetDefaults.CONTENT_KEYFRAMES))
contentAnimation = animation
.addAnimation(
createAnimation('contentAnimation')
.addElement(contentEl!.parentElement!)
.keyframes(SheetDefaults.CONTENT_KEYFRAMES)
)
.childAnimations.find((ani) => ani.id === 'contentAnimation');
}

Expand Down Expand Up @@ -374,7 +375,10 @@ export const createSheetGesture = (
* re-enabled. Native iOS allows for scrolling on the sheet modal as soon
* as the gesture is released, so we align with that.
*/
if (contentEl && (snapToBreakpoint === breakpoints[breakpoints.length - 1] || snapBreakpoints.includes(snapToBreakpoint))) {
if (
contentEl &&
(snapToBreakpoint === breakpoints[breakpoints.length - 1] || snapBreakpoints.includes(snapToBreakpoint))
) {
contentEl.scrollY = true;
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class Modal implements ComponentInterface, OverlayInterface {
* The difference between `breakpoints` and `snapBreakpoints` is that `snapBreakpoints`
* allows the content to scroll, and the modal will only be draggable by the handle.
*/
@Prop() snapBreakpoints?: number[];
@Prop() snapBreakpoints?: number[];

/**
* A decimal value between 0 and 1 that indicates the
Expand Down

0 comments on commit 95c5314

Please sign in to comment.