diff --git a/Models/Constants.ts b/Models/Constants.ts index 9091bfb..2119841 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,7 +2,7 @@ import { Utils } from "../Utils"; export default class Constants { - public static vNumber = "0.6.8"; + public static vNumber = "0.6.8a"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { diff --git a/UI/Input/DirectionInput.ts b/UI/Input/DirectionInput.ts index 83b18a1..008d75b 100644 --- a/UI/Input/DirectionInput.ts +++ b/UI/Input/DirectionInput.ts @@ -23,7 +23,7 @@ export default class DirectionInput extends InputElement { return; } const cone = selfElement.getElementsByClassName("direction-svg")[0] as HTMLElement - cone.style.rotate = rotation + "deg"; + cone.style.transform = `rotate(${rotation}deg)`; }) @@ -38,7 +38,7 @@ export default class DirectionInput extends InputElement { return new Combine([ `
`, Svg.direction_svg().SetStyle( - `position: absolute;top: 0;left: 0;width: 100%;height: 100%;rotate:${this.value.data}deg;`) + `position: absolute;top: 0;left: 0;width: 100%;height: 100%;transform:rotate(${this.value.data ?? 0}deg);`) .SetClass("direction-svg"), Svg.compass_svg().SetStyle( "position: absolute;top: 0;left: 0;width: 100%;height: 100%;") @@ -74,7 +74,7 @@ export default class DirectionInput extends InputElement { htmlElement.onmousedown = (ev: MouseEvent) => { isDown = true; - onPosChange(ev.x, ev.y); + onPosChange(ev.clientX, ev.clientY); ev.preventDefault(); } @@ -84,7 +84,7 @@ export default class DirectionInput extends InputElement { htmlElement.onmousemove = (ev: MouseEvent) => { if (isDown) { - onPosChange(ev.x, ev.y); + onPosChange(ev.clientX, ev.clientY); } ev.preventDefault(); } }