From c23892f836848c9bf559d7b843cb2583ea7e5872 Mon Sep 17 00:00:00 2001
From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com>
Date: Fri, 1 May 2020 23:30:30 +0200
Subject: [PATCH] Option to minimize added
---
.../console-wrapper.component.html | 10 ++++++++--
.../console-wrapper/console-wrapper.component.ts | 16 ++++++++++++++--
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/src/app/components/project-map/console-wrapper/console-wrapper.component.html b/src/app/components/project-map/console-wrapper/console-wrapper.component.html
index b149b828..4e6bd9ad 100644
--- a/src/app/components/project-map/console-wrapper/console-wrapper.component.html
+++ b/src/app/components/project-map/console-wrapper/console-wrapper.component.html
@@ -40,14 +40,20 @@
+
+
-
+
-
diff --git a/src/app/components/project-map/console-wrapper/console-wrapper.component.ts b/src/app/components/project-map/console-wrapper/console-wrapper.component.ts
index 5d238dee..34836a9a 100644
--- a/src/app/components/project-map/console-wrapper/console-wrapper.component.ts
+++ b/src/app/components/project-map/console-wrapper/console-wrapper.component.ts
@@ -28,6 +28,8 @@ export class ConsoleWrapperComponent implements OnInit {
public isDraggingEnabled: boolean = false;
public isLightThemeEnabled: boolean = false;
+ public isMinimized: boolean = false;
+
constructor(
private consoleService: NodeConsoleService,
private themeService: ThemeService
@@ -38,7 +40,7 @@ export class ConsoleWrapperComponent implements OnInit {
ngOnInit() {
this.themeService.getActualTheme() === 'light' ? this.isLightThemeEnabled = true : this.isLightThemeEnabled = false;
- this.style = { bottom: '20px', left: '20px', width: '720px', height: '456px'};
+ this.style = { bottom: '20px', left: '20px', width: '720px', height: '460px'};
this.consoleService.nodeConsoleTrigger.subscribe((node) => {
this.addTab(node, true);
@@ -50,7 +52,17 @@ export class ConsoleWrapperComponent implements OnInit {
});
}
+ minimize(value: boolean) {
+ this.isMinimized = value;
+ if (!value) {
+ this.style = { bottom: '20px', left: '20px', width: '720px', height: '460px'};
+ } else {
+ this.style = { bottom: '20px', left: '20px', width: '720px', height: '56px'};
+ }
+ }
+
addTab(node: Node, selectAfterAdding: boolean) {
+ this.minimize(false);
this.nodes.push(node);
if (selectAfterAdding) {
@@ -99,7 +111,7 @@ export class ConsoleWrapperComponent implements OnInit {
event.rectangle.width &&
event.rectangle.height &&
(event.rectangle.width < 720 ||
- event.rectangle.height < 456)
+ event.rectangle.height < 460)
) {
return false;
}