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:
parent
9caee0c77c
commit
c8254238c7
@ -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;
|
||||
}
|
||||
|
||||
@ -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`;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user