Merge pull request #96 from Simon-Mong/patch-19

fix the wrong report of X and Y of mousepointer.
pull/97/head^2
Michael Aschauer 2021-08-28 12:36:33 +02:00 zatwierdzone przez GitHub
commit fdde49b34e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 8 dodań i 7 usunięć

Wyświetl plik

@ -2698,13 +2698,14 @@ StageMorph.prototype.initCamera = function () {
};
myself.camera.applyZoom = function () {
var zoom = myself.camera ? myself.camera.zoomFactor : 2,
width = Math.max(myself.width(), 480),
height = Math.max(myself.height(), 360);
this.left = width / - zoom;
this.right = width / zoom;
this.top = height / zoom;
this.bottom = height / - zoom;
var zoom = myself.camera ? myself.camera.zoomFactor : 2;
let width = Math.max(myself.width(), 480);
let height = Math.max(myself.height(), 360);
this.left = width /myself.scale/ - zoom;
this.right = width/myself.scale / zoom;
this.top = height /myself.scale/ zoom;
this.bottom = height /myself.scale/ - zoom;
this.updateProjectionMatrix();
};