diff --git a/client/public/stylesheets/panels/unitcontrol.css b/client/public/stylesheets/panels/unitcontrol.css index 4e659fbd..9b576252 100644 --- a/client/public/stylesheets/panels/unitcontrol.css +++ b/client/public/stylesheets/panels/unitcontrol.css @@ -16,6 +16,10 @@ body.feature-forceShowUnitControlPanel #unit-control-panel { row-gap: 10px; } +#unit-controls { + padding-right: 10px; +} + #unit-control-panel>div:nth-child(2) { width: 330px; } diff --git a/client/src/panels/unitcontrolpanel.ts b/client/src/panels/unitcontrolpanel.ts index 1ec769f6..b317992d 100644 --- a/client/src/panels/unitcontrolpanel.ts +++ b/client/src/panels/unitcontrolpanel.ts @@ -161,6 +161,7 @@ export class UnitControlPanel extends Panel { this.#followRoadsSwitch.resetExpectedValue(); this.#altitudeSlider.resetExpectedValue(); this.#speedSlider.resetExpectedValue(); + this.#calculateMaxHeight(); } addButtons() { @@ -486,6 +487,7 @@ export class UnitControlPanel extends Panel { #calculateMaxHeight() { const element = document.getElementById("unit-control-panel-content"); + this.#calculateTop(); if (element) element.style.maxHeight = `${window.innerHeight - this.getElement().offsetTop - 10}px`; }