mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Aligned getting and naming convention.
This commit is contained in:
parent
fa03e9dbd8
commit
764064fc0d
@ -87,7 +87,7 @@ function requestUpdate() {
|
||||
/* Main update rate = 250ms is minimum time, equal to server update time. */
|
||||
getUnits((data: UnitsData) => {
|
||||
getUnitsManager()?.update(data);
|
||||
unitDataTable.refresh( data.units );
|
||||
getUnitDataTable().update( data.units )
|
||||
checkSessionHash(data.sessionHash);
|
||||
}, false);
|
||||
setTimeout(() => requestUpdate(), getConnected() ? 250 : 1000);
|
||||
@ -225,6 +225,10 @@ export function getMissionData() {
|
||||
return missionHandler;
|
||||
}
|
||||
|
||||
export function getUnitDataTable() {
|
||||
return unitDataTable;
|
||||
}
|
||||
|
||||
export function getUnitsManager() {
|
||||
return unitsManager;
|
||||
}
|
||||
|
||||
@ -32,7 +32,17 @@ export class UnitDataTable {
|
||||
}
|
||||
|
||||
|
||||
refresh( units:object ) {
|
||||
show() {
|
||||
this.getElement()?.closest( ".ol-dialog" )?.classList.remove( "hide" );
|
||||
}
|
||||
|
||||
|
||||
toggle() {
|
||||
this.getElement()?.closest( ".ol-dialog" )?.classList.toggle( "hide" );
|
||||
}
|
||||
|
||||
|
||||
update( units:object ) {
|
||||
|
||||
const unitsArray = Object.values( units ).sort( ( a, b ) => {
|
||||
|
||||
@ -90,14 +100,4 @@ export class UnitDataTable {
|
||||
|
||||
}
|
||||
|
||||
|
||||
show() {
|
||||
this.getElement()?.closest( ".ol-dialog" )?.classList.remove( "hide" );
|
||||
}
|
||||
|
||||
|
||||
toggle() {
|
||||
this.getElement()?.closest( ".ol-dialog" )?.classList.toggle( "hide" );
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user