From 58497c1f5acc557a779885767c4df7c1b445d4e4 Mon Sep 17 00:00:00 2001 From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com> Date: Wed, 2 Sep 2020 15:30:01 +0200 Subject: [PATCH] Update log-console.component.ts --- .../project-map/log-console/log-console.component.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/components/project-map/log-console/log-console.component.ts b/src/app/components/project-map/log-console/log-console.component.ts index b4c06803..6692b3b4 100644 --- a/src/app/components/project-map/log-console/log-console.component.ts +++ b/src/app/components/project-map/log-console/log-console.component.ts @@ -16,6 +16,7 @@ import { ResizeEvent } from 'angular-resizable-element'; import { ThemeService } from '../../../services/theme.service'; import { FormControl } from '@angular/forms'; import { version } from '../../../version'; +import { NodeConsoleService } from '../../../services/nodeConsole.service'; @Component({ @@ -63,10 +64,17 @@ export class LogConsoleComponent implements OnInit, AfterViewInit, OnDestroy { private logEventsDataSource: LogEventsDataSource, private httpService: HttpServer, private themeService: ThemeService, - private cd: ChangeDetectorRef + private cd: ChangeDetectorRef, + private nodeConsoleService: NodeConsoleService, + private changeDetectorRef: ChangeDetectorRef ) {} ngOnInit() { + this.nodeConsoleService.consoleResized.subscribe(ev => { + this.style = { bottom: '20px', left: '20px', width: `${ev.width}px`, height: `${ev.height - 70}px`}; + this.changeDetectorRef.detectChanges(); + }); + this.themeService.getActualTheme() === 'light' ? this.isLightThemeEnabled = true : this.isLightThemeEnabled = false this.style = { bottom: '20px', left: '20px', width: '720px', height: '340px'};