mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-17 06:18:09 +00:00
Update project-map.component.ts
This commit is contained in:
@ -436,6 +436,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
if(!nodeAddedEvent) {
|
if(!nodeAddedEvent) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.progressService.activate();
|
||||||
this.nodeService.createFromTemplate(this.server, this.project, nodeAddedEvent.template, nodeAddedEvent.x, nodeAddedEvent.y, nodeAddedEvent.server).subscribe((node: Node) => {
|
this.nodeService.createFromTemplate(this.server, this.project, nodeAddedEvent.template, nodeAddedEvent.x, nodeAddedEvent.y, nodeAddedEvent.server).subscribe((node: Node) => {
|
||||||
// if (nodeAddedEvent.name !== nodeAddedEvent.template.name) {
|
// if (nodeAddedEvent.name !== nodeAddedEvent.template.name) {
|
||||||
// node.name = nodeAddedEvent.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.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;
|
nodeAddedEvent.y = nodeAddedEvent.y + 50 < this.project.scene_height/2 ? nodeAddedEvent.y + 50 : nodeAddedEvent.y;
|
||||||
this.onNodeCreation(nodeAddedEvent);
|
this.onNodeCreation(nodeAddedEvent);
|
||||||
|
} else {
|
||||||
|
this.progressService.deactivate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user