From c73a8ddf1694f35c590a0522c562894b05fb4016 Mon Sep 17 00:00:00 2001 From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com> Date: Mon, 24 Feb 2020 15:19:28 +0100 Subject: [PATCH] Updating add node dialog --- .../components/project-map/project-map.component.ts | 8 ++++---- .../template-list-dialog.component.html | 4 ++-- .../template-list-dialog.component.ts | 10 +++++----- src/app/services/node.service.ts | 7 +++++++ 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/app/components/project-map/project-map.component.ts b/src/app/components/project-map/project-map.component.ts index 99bd4865..0759c990 100644 --- a/src/app/components/project-map/project-map.component.ts +++ b/src/app/components/project-map/project-map.component.ts @@ -424,10 +424,10 @@ export class ProjectMapComponent implements OnInit, OnDestroy { return; } this.nodeService.createFromTemplate(this.server, this.project, nodeAddedEvent.template, nodeAddedEvent.x, nodeAddedEvent.y, nodeAddedEvent.server).subscribe((node: Node) => { - if (nodeAddedEvent.name !== nodeAddedEvent.template.name) { - node.name = nodeAddedEvent.name; - this.nodeService.updateNode(this.server, node).subscribe(()=>{}); - } + // if (nodeAddedEvent.name !== nodeAddedEvent.template.name) { + // node.name = nodeAddedEvent.name; + // this.nodeService.updateNode(this.server, node).subscribe(()=>{}); + // } this.projectService.nodes(this.server, this.project.project_id).subscribe((nodes: Node[]) => { nodes.filter((node) => node.label.style === null).forEach((node) => { diff --git a/src/app/components/template/template-list-dialog/template-list-dialog.component.html b/src/app/components/template/template-list-dialog/template-list-dialog.component.html index aa5b5b31..70c5851d 100644 --- a/src/app/components/template/template-list-dialog/template-list-dialog.component.html +++ b/src/app/components/template/template-list-dialog/template-list-dialog.component.html @@ -39,9 +39,9 @@