Updating add node dialog

This commit is contained in:
piotrpekala7
2020-02-24 15:19:28 +01:00
parent f40b2c64c2
commit c73a8ddf16
4 changed files with 18 additions and 11 deletions

View File

@ -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) => {