feat(RootLayout): added topmost method to retrieve view at top (#9826)

This commit is contained in:
Dimitris - Rafail Katsampas
2022-03-17 00:11:21 +02:00
committed by GitHub
parent 61ba4819e9
commit 3bb8fc28e9
3 changed files with 5 additions and 0 deletions

View File

Binary file not shown.

View File

@@ -4,6 +4,7 @@ import { View } from '../../core/view';
export class RootLayout extends GridLayout {
open(view: View, options?: RootLayoutOptions): Promise<void>;
close(view: View, exitTo?: TransitionAnimation): Promise<void>;
topmost(): View;
bringToFront(view: View, animated?: boolean): Promise<void>;
closeAll(): Promise<void>;
getShadeCover(): View;

View File

@@ -184,6 +184,10 @@ export class RootLayoutBase extends GridLayout {
});
}
topmost(): View {
return this.popupViews.length ? this.popupViews[this.popupViews.length - 1].view : null;
}
// bring any view instance open on the rootlayout to front of all the children visually
bringToFront(view: View, animated: boolean = false): Promise<void> {
return new Promise((resolve, reject) => {