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
|
* @param {MouseEvent} event
|
||||||
*/
|
*/
|
||||||
handleMousemove(event) {
|
handleMousemove(event) {
|
||||||
let x = event.clientX;
|
this.mousePosition = new Vector(event.clientX, event.clientY);
|
||||||
let y = event.clientY;
|
|
||||||
|
|
||||||
if (event.type === "mouseout" || event.type === "mouseleave") {
|
|
||||||
x = -1;
|
|
||||||
y = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.mousePosition = new Vector(x, y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -862,7 +862,11 @@ export class Camera extends BasicSerializableObject {
|
|||||||
* @param {number} dt
|
* @param {number} dt
|
||||||
*/
|
*/
|
||||||
internalUpdateMousePanning(now, 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
|
// Not enabled
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user