mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-01 05:56:23 +00:00
Reverse order of messaging messages
This commit is contained in:
@ -20,6 +20,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
deploying = false;
|
||||
deploymentNotificationSubscription: Subscription;
|
||||
@ViewChild('webiframe') webiframe: ElementRef;
|
||||
@ViewChild('tfwmessages') messages: ElementRef;
|
||||
|
||||
layout: string = config.dashboard.currentLayout;
|
||||
hideMessages: boolean = config.dashboard.hideMessages;
|
||||
@ -125,4 +126,11 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
this.selectTerminalMenuItem('console');
|
||||
}
|
||||
}
|
||||
|
||||
scrollMessagesToBottom(): void {
|
||||
const element = this.messages.nativeElement;
|
||||
// This must be done in the Angular event loop to avoid messing up
|
||||
// change detection (not in the template like ConsoleComponent does)
|
||||
element.scrollTop = element.scrollHeight;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user