mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-22 14:22:21 +00:00
Fix updating text position when zoomed in/out
This commit is contained in:
parent
f866741011
commit
2a859e6329
@ -32,7 +32,7 @@ export class NodeService {
|
||||
.post(
|
||||
server,
|
||||
`/projects/${project.project_id}/templates/${template.template_id}`,
|
||||
{'x': x, 'y': y, 'compute_id': compute_id});
|
||||
{'x': Math.round(x), 'y': Math.round(y), 'compute_id': compute_id});
|
||||
}
|
||||
|
||||
updatePosition(server: Server, node: Node, x: number, y: number): Observable<Node> {
|
||||
@ -50,8 +50,8 @@ export class NodeService {
|
||||
'rotation': label.rotation,
|
||||
'style': label.style,
|
||||
'text': label.text,
|
||||
'x': label.x,
|
||||
'y': label.y
|
||||
'x': Math.round(label.x),
|
||||
'y': Math.round(label.y)
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -59,8 +59,8 @@ export class NodeService {
|
||||
update(server: Server, node: Node): Observable<Node> {
|
||||
return this.httpServer
|
||||
.put<Node>(server, `/projects/${node.project_id}/nodes/${node.node_id}`, {
|
||||
'x': node.x,
|
||||
'y': node.y,
|
||||
'x': Math.round(node.x),
|
||||
'y': Math.round(node.y),
|
||||
'z': node.z
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user