fix(popover): add back event param

This commit is contained in:
mhartington
2017-12-05 10:59:29 -05:00
parent f4cf918583
commit 9e7ae4b0df
3 changed files with 7 additions and 15 deletions

View File

@ -97,25 +97,17 @@ export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLEle
if (checkSafeAreaLeft) {
if (CSS.supports('left', 'constant(safe-area-inset-left)')) {
contentEl.style.left = `calc(${
popoverCSS.left
}px + constant(safe-area-inset-left)`;
contentEl.style.left = `calc(${popoverCSS.left}px + constant(safe-area-inset-left)`;
} else if (CSS.supports('left', 'env(safe-area-inset-left)')) {
contentEl.style.left = `calc(${
popoverCSS.left
}px + env(safe-area-inset-left)`;
contentEl.style.left = `calc(${popoverCSS.left}px + env(safe-area-inset-left)`;
}
}
if (checkSafeAreaRight) {
if (CSS.supports('right', 'constant(safe-area-inset-right)')) {
contentEl.style.left = `calc(${
popoverCSS.left
}px - constant(safe-area-inset-right)`;
contentEl.style.left = `calc(${popoverCSS.left}px - constant(safe-area-inset-right)`;
} else if (CSS.supports('right', 'env(safe-area-inset-right)')) {
contentEl.style.left = `calc(${
popoverCSS.left
}px - env(safe-area-inset-right)`;
contentEl.style.left = `calc(${popoverCSS.left}px - env(safe-area-inset-right)`;
}
}

View File

@ -75,7 +75,7 @@ export class Popover {
@Prop() popoverId: string;
@Prop() showBackdrop: boolean = true;
@Prop() translucent: boolean = false;
@Prop() animate: boolean;
@Prop() animate: boolean = true;
@Method()
@ -90,7 +90,7 @@ export class Popover {
const animationBuilder = this.enterAnimation || this.config.get('popoverEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
// 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;
if (!this.animate) {
// if the duration is 0, it won't actually animate I don't think