mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-20 13:33:06 +00:00
Update project-map.component.ts
This commit is contained in:
parent
932c482855
commit
06e3befe0e
@ -436,6 +436,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
||||
if(!nodeAddedEvent) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.progressService.activate();
|
||||
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;
|
||||
@ -454,6 +456,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
||||
nodeAddedEvent.x = nodeAddedEvent.x + 50 < this.project.scene_width/2 ? nodeAddedEvent.x + 50 : nodeAddedEvent.x;
|
||||
nodeAddedEvent.y = nodeAddedEvent.y + 50 < this.project.scene_height/2 ? nodeAddedEvent.y + 50 : nodeAddedEvent.y;
|
||||
this.onNodeCreation(nodeAddedEvent);
|
||||
} else {
|
||||
this.progressService.deactivate();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user