mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(popover): add back event param
This commit is contained in:
@ -97,25 +97,17 @@ export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLEle
|
|||||||
|
|
||||||
if (checkSafeAreaLeft) {
|
if (checkSafeAreaLeft) {
|
||||||
if (CSS.supports('left', 'constant(safe-area-inset-left)')) {
|
if (CSS.supports('left', 'constant(safe-area-inset-left)')) {
|
||||||
contentEl.style.left = `calc(${
|
contentEl.style.left = `calc(${popoverCSS.left}px + constant(safe-area-inset-left)`;
|
||||||
popoverCSS.left
|
|
||||||
}px + constant(safe-area-inset-left)`;
|
|
||||||
} else if (CSS.supports('left', 'env(safe-area-inset-left)')) {
|
} else if (CSS.supports('left', 'env(safe-area-inset-left)')) {
|
||||||
contentEl.style.left = `calc(${
|
contentEl.style.left = `calc(${popoverCSS.left}px + env(safe-area-inset-left)`;
|
||||||
popoverCSS.left
|
|
||||||
}px + env(safe-area-inset-left)`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkSafeAreaRight) {
|
if (checkSafeAreaRight) {
|
||||||
if (CSS.supports('right', 'constant(safe-area-inset-right)')) {
|
if (CSS.supports('right', 'constant(safe-area-inset-right)')) {
|
||||||
contentEl.style.left = `calc(${
|
contentEl.style.left = `calc(${popoverCSS.left}px - constant(safe-area-inset-right)`;
|
||||||
popoverCSS.left
|
|
||||||
}px - constant(safe-area-inset-right)`;
|
|
||||||
} else if (CSS.supports('right', 'env(safe-area-inset-right)')) {
|
} else if (CSS.supports('right', 'env(safe-area-inset-right)')) {
|
||||||
contentEl.style.left = `calc(${
|
contentEl.style.left = `calc(${popoverCSS.left}px - env(safe-area-inset-right)`;
|
||||||
popoverCSS.left
|
|
||||||
}px - env(safe-area-inset-right)`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ export class Popover {
|
|||||||
@Prop() popoverId: string;
|
@Prop() popoverId: string;
|
||||||
@Prop() showBackdrop: boolean = true;
|
@Prop() showBackdrop: boolean = true;
|
||||||
@Prop() translucent: boolean = false;
|
@Prop() translucent: boolean = false;
|
||||||
@Prop() animate: boolean;
|
@Prop() animate: boolean = true;
|
||||||
|
|
||||||
|
|
||||||
@Method()
|
@Method()
|
||||||
@ -90,7 +90,7 @@ export class Popover {
|
|||||||
const animationBuilder = this.enterAnimation || this.config.get('popoverEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
const animationBuilder = this.enterAnimation || this.config.get('popoverEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
return this.animationCtrl.create(animationBuilder, this.el, this.ev).then(animation => {
|
||||||
this.animation = animation;
|
this.animation = animation;
|
||||||
if (!this.animate) {
|
if (!this.animate) {
|
||||||
// if the duration is 0, it won't actually animate I don't think
|
// if the duration is 0, it won't actually animate I don't think
|
||||||
|
|||||||
Reference in New Issue
Block a user