1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Add originalRotation to static comp in order to fix bugs with the automatic placement

This commit is contained in:
Tobias Springer
2020-05-10 17:45:48 +02:00
parent 72476486b7
commit bb1758642b
16 changed files with 133 additions and 69 deletions

View File

@@ -176,6 +176,7 @@ export class InputDistributor {
*/
handleBlur() {
this.shiftIsDown = false;
this.altIsDown = false;
this.forwardToReceiver("pageBlur", {});
this.forwardToReceiver("shiftUp", {});
}
@@ -187,6 +188,9 @@ export class InputDistributor {
if (event.keyCode === 16) {
this.shiftIsDown = true;
}
if (event.keyCode === 18) {
this.altIsDown = true;
}
if (
// TAB
@@ -225,6 +229,10 @@ export class InputDistributor {
this.shiftIsDown = false;
this.forwardToReceiver("shiftUp", {});
}
if (event.keyCode === 18) {
this.altIsDown = false;
this.forwardToReceiver("altUp", {});
}
this.forwardToReceiver("keyup", {
keyCode: event.keyCode,

View File

@@ -10,6 +10,7 @@ export class InputReceiver {
this.keyup = new Signal();
this.pageBlur = new Signal();
this.shiftUp = new Signal();
this.altUp = new Signal();
// Dispatched on destroy
this.destroyed = new Signal();