mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(modal): fix backdrop animation for sheets with off-center backdropBreakpoint (#24061)
This commit is contained in:
@@ -22,7 +22,7 @@ export const createSheetGesture = (
|
||||
|
||||
const customBackdrop = [
|
||||
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
||||
{ offset: backdropBreakpoint, opacity: 0 },
|
||||
{ offset: 1 - backdropBreakpoint, opacity: 0 },
|
||||
{ offset: 1, opacity: 0 }
|
||||
]
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
<ion-button id="custom-breakpoint-modal" onclick="presentModal({ initialBreakpoint: 0.5, breakpoints: [0, 0.5, 1] })">Present Sheet Modal (Custom Breakpoints)</ion-button>
|
||||
<ion-button id="custom-breakpoint-modal" onclick="presentModal({ initialBreakpoint: 0.5, breakpoints: [0, 0.5, 0.75] })">Present Sheet Modal (Max breakpoint is not 1)</ion-button>
|
||||
<ion-button id="custom-backdrop-modal" onclick="presentModal({ backdropBreakpoint: 0.5, initialBreakpoint: 0.5 })">Present Sheet Modal (Custom Backdrop Breakpoint)</ion-button>
|
||||
<ion-button id="custom-backdrop-off-center-modal" onClick="presentModal({ backdropBreakpoint: 0.3, initialBreakpoint: 0.3, breakpoints: [0.3, 0.5, 0.7, 1] })">Present Sheet Modal (Backdrop breakpoint is off-center)</ion-button>
|
||||
<ion-button id="custom-height-modal" onclick="presentModal({ cssClass: 'custom-height' })">Present Sheet Modal (Custom Height)</ion-button>
|
||||
<ion-button id="custom-handle-modal" onclick="presentModal({ cssClass: 'custom-handle' })">Present Sheet Modal (Custom Handle)</ion-button>
|
||||
<ion-button id="no-handle-modal" onclick="presentModal({ handle: false })">Present Sheet Modal (No Handle)</ion-button>
|
||||
|
||||
Reference in New Issue
Block a user