* Creates the context object for safe-area utilities. * * `hasCustomDimensions` is only set by `setInitialSafeAreaOverrides()` * because it is only read by `getInitialSafeAreaConfig()`. Other callers * (resize handler, post-animation update, fullscreen-padding apply) would * pay a `ge
()
| 1436 | * pay a `getComputedStyle()` cost for a value they never consult. |
| 1437 | */ |
| 1438 | private getSafeAreaContext(): ModalSafeAreaContext { |
| 1439 | return { |
| 1440 | isSheetModal: this.isSheetModal, |
| 1441 | isCardModal: this.presentingElement !== undefined && getIonMode(this) === 'ios', |
| 1442 | presentingElement: this.presentingElement, |
| 1443 | breakpoints: this.breakpoints, |
| 1444 | currentBreakpoint: this.currentBreakpoint, |
| 1445 | }; |
| 1446 | } |
| 1447 | |
| 1448 | /** |
| 1449 | * Sets initial safe-area overrides before modal animation. |
no test coverage detected