Merge branch 'master' into Fit-in-view-option

This commit is contained in:
Piotr Pekala
2019-10-23 04:40:09 -07:00
17 changed files with 257 additions and 52 deletions

View File

@ -79,10 +79,11 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
public server: Server;
public ws: WebSocket;
public isProjectMapMenuVisible: boolean = false;
public isConsoleVisible: boolean = false;
public isTopologySummaryVisible: boolean = false;
public isConsoleVisible: boolean = true;
public isTopologySummaryVisible: boolean = true;
public isInterfaceLabelVisible: boolean = false;
public notificationsVisibility: boolean = false;
public layersVisibility: boolean = false;
tools = {
selection: true,
@ -238,6 +239,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
}));
this.notificationsVisibility = localStorage.getItem('notificationsVisibility') === 'true' ? true : false;
this.layersVisibility = localStorage.getItem('layersVisibility') === 'true' ? true : false;
this.addKeyboardListeners();
}
@ -618,6 +620,17 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
}
}
public toggleLayers(visible: boolean) {
this.layersVisibility = visible;
this.mapSettingsService.toggleLayers(visible);
if (this.layersVisibility) {
localStorage.setItem('layersVisibility', 'true');
} else {
localStorage.removeItem('layersVisibility')
}
this.mapChild.applyMapSettingsChanges();
}
private showMessage(msg) {
if (this.notificationsVisibility) {
if (msg.type === 'error') this.toasterService.error(msg.message);