Fixed odd 'undefined' bug

This commit is contained in:
PeekabooSteam 2023-11-05 13:15:41 +00:00
parent 4c7f979e56
commit 073281135c

View File

@ -734,7 +734,7 @@ export class Map extends L.Map {
const makeTitle = (isProtected:boolean) => {
return ( isProtected ) ? "Unit type is protected and will ignore orders" : "Unit is NOT protected and will respond to orders";
}
this.#mapMarkerControls.forEach( (control:MapMarkerControl) => {
this.getMapMarkerControls().forEach( (control:MapMarkerControl) => {
const toggles = `["${control.toggles.join('","')}"]`;
const div = document.createElement("div");
div.className = control.protectable === true ? "protectable" : "";
@ -901,5 +901,9 @@ export class Map extends L.Map {
this.#visibilityOptions[option] = ev.currentTarget.checked;
document.dispatchEvent(new CustomEvent("mapVisibilityOptionsChanged"));
}
getMapMarkerControls() {
return this.#mapMarkerControls;
}
}