Update project-map.component.ts

This commit is contained in:
Piotr Pekala 2019-10-16 08:19:00 -07:00
parent b8d607b7c6
commit 7576b1c81c

View File

@ -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);
}
}