mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
@ -9,7 +9,7 @@ export function createOverlay<T extends HTMLIonOverlayElement>(element: T, opts:
|
|||||||
// convert the passed in overlay options into props
|
// convert the passed in overlay options into props
|
||||||
// that get passed down into the new overlay
|
// that get passed down into the new overlay
|
||||||
Object.assign(element, opts);
|
Object.assign(element, opts);
|
||||||
|
element.classList.add('ion-page-hidden');
|
||||||
element.overlayId = lastId++;
|
element.overlayId = lastId++;
|
||||||
|
|
||||||
// append the overlay element to the document body
|
// append the overlay element to the document body
|
||||||
@ -132,6 +132,9 @@ async function overlayAnimation(
|
|||||||
overlay.animation = undefined;
|
overlay.animation = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make overlay visible in case it's hidden
|
||||||
|
baseEl.classList.remove('ion-page-hidden');
|
||||||
|
|
||||||
const aniRoot = baseEl.shadowRoot || overlay.el;
|
const aniRoot = baseEl.shadowRoot || overlay.el;
|
||||||
const animation = overlay.animation = await overlay.animationCtrl.create(animationBuilder, aniRoot, opts);
|
const animation = overlay.animation = await overlay.animationCtrl.create(animationBuilder, aniRoot, opts);
|
||||||
overlay.animation = animation;
|
overlay.animation = animation;
|
||||||
|
Reference in New Issue
Block a user