mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
lint
This commit is contained in:
@@ -54,16 +54,7 @@ export const iosEnterAnimation = (baseEl: HTMLElement, opts?: any): Animation =>
|
||||
|
||||
const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
|
||||
|
||||
const {
|
||||
originX,
|
||||
originY,
|
||||
top,
|
||||
left,
|
||||
bottom,
|
||||
arrowTop,
|
||||
arrowLeft,
|
||||
addPopoverBottomClass,
|
||||
} = calculateWindowAdjustment(
|
||||
const { originX, originY, top, left, bottom, arrowTop, arrowLeft, addPopoverBottomClass } = calculateWindowAdjustment(
|
||||
side,
|
||||
results.top,
|
||||
results.left,
|
||||
|
||||
@@ -850,7 +850,7 @@ export const calculateWindowAdjustment = (
|
||||
*/
|
||||
let horizontalSafeAreaApprox = 0;
|
||||
let verticalSafeAreaApprox = 0;
|
||||
if (win !== undefined && win.matchMedia !== undefined) {
|
||||
if (win?.matchMedia !== undefined) {
|
||||
verticalSafeAreaApprox = win.innerHeight * 0.05;
|
||||
|
||||
/**
|
||||
@@ -899,7 +899,10 @@ export const calculateWindowAdjustment = (
|
||||
* the trigger, then we should not adjust top
|
||||
* margins.
|
||||
*/
|
||||
if (triggerTop + triggerHeight + contentHeight + verticalSafeAreaApprox > bodyHeight && (side === 'top' || side === 'bottom')) {
|
||||
if (
|
||||
triggerTop + triggerHeight + contentHeight + verticalSafeAreaApprox > bodyHeight &&
|
||||
(side === 'top' || side === 'bottom')
|
||||
) {
|
||||
if (triggerTop - contentHeight > 0) {
|
||||
/**
|
||||
* While we strive to align the popover with the trigger
|
||||
|
||||
Reference in New Issue
Block a user