mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-21 02:01:19 +00:00
Update node.service.ts
This commit is contained in:
parent
57490b7272
commit
220bda22f5
@ -72,8 +72,8 @@ export class NodeService {
|
||||
xPosition = Math.round((xPosition + node.width/2) / project.grid_size) * project.grid_size;
|
||||
yPosition = Math.round((yPosition + node.height/2) / project.grid_size) * project.grid_size;
|
||||
|
||||
xPosition = Math.round(xPosition - node.width/2);
|
||||
yPosition = Math.round(yPosition - node.height/2);
|
||||
xPosition = Math.round(xPosition - node.width/2) - ((project.scene_width - (Math.floor(project.scene_width / project.grid_size) * project.grid_size)) / 2);
|
||||
yPosition = Math.round(yPosition - node.height/2) - ((project.scene_height - (Math.floor(project.scene_height / project.grid_size) * project.grid_size)) / 2);
|
||||
}
|
||||
|
||||
return this.httpServer.put<Node>(server, `/projects/${node.project_id}/nodes/${node.node_id}`, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user