mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Scrollable unit control panel tweak
This commit is contained in:
@@ -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`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user