Update log-console.component.ts

This commit is contained in:
Piotr Pekala 2019-10-09 08:10:28 -07:00
parent efdf98b869
commit 63987f5df8

View File

@ -55,7 +55,14 @@ export class LogConsoleComponent implements OnInit, AfterViewInit, OnDestroy {
ngOnInit() {
this.nodeSubscription = this.projectWebServiceHandler.nodeNotificationEmitter.subscribe((event) => {
let node: Node = event.event as Node;
let message = `Event received: ${event.action} - ${this.printNode(node)}.`
let message: string = '';
if (node.label) {
message = `Event received: ${event.action} - ${this.printNode(node)}.`;
} else {
message = `Event received: ${event.action} - ${node.name}.`;
}
this.showMessage({
type: 'map update',
message: message