1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Fixed for fullscreen

This commit is contained in:
Exund 2020-09-21 15:26:21 +02:00
parent df97bff53f
commit 357e06f0c7
2 changed files with 6 additions and 10 deletions

View File

@ -231,15 +231,7 @@ export class Application {
* @param {MouseEvent} event
*/
handleMousemove(event) {
let x = event.clientX;
let y = event.clientY;
if (event.type === "mouseout" || event.type === "mouseleave") {
x = -1;
y = -1;
}
this.mousePosition = new Vector(x, y);
this.mousePosition = new Vector(event.clientX, event.clientY);
}
/**

View File

@ -862,7 +862,11 @@ export class Camera extends BasicSerializableObject {
* @param {number} dt
*/
internalUpdateMousePanning(now, dt) {
if (!this.root.app.settings.getAllSettings().enableMousePan || !this.root.app.focused) {
if (!this.root.app.focused) {
return;
}
if (!this.root.app.settings.getAllSettings().enableMousePan) {
// Not enabled
return;
}