mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-18 18:56:26 +00:00
Update project-map.component.ts
This commit is contained in:
parent
b8d607b7c6
commit
7576b1c81c
@ -517,12 +517,18 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
||||
this.project.scene_height = this.project.scene_height * scale;
|
||||
let scrollX: number = (minX * scale) + this.project.scene_width/2;
|
||||
let scrollY: number = (minY * scale) + this.project.scene_height/2;
|
||||
|
||||
// console.log(scrollX);
|
||||
// console.log(scrollY);
|
||||
// let scrollY = (this.project.scene_height - windowHeight)/2;
|
||||
// let scrollX = (this.project.scene_width - windowWidth)/2;
|
||||
window.scrollTo(scrollX, scrollY);
|
||||
} else {
|
||||
let scrollX: number = (minX * scale) + this.project.scene_width/2;
|
||||
let scrollY: number = (minY * scale) + this.project.scene_height/2;
|
||||
|
||||
// console.log(scrollX);
|
||||
// console.log(scrollY);
|
||||
// let scrollY = (this.project.scene_height - windowHeight)/2;
|
||||
// let scrollX = (this.project.scene_width - windowWidth)/2;
|
||||
window.scrollTo(scrollX, scrollY);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user