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:
parent
df97bff53f
commit
357e06f0c7
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user