mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Resolved commits.
This commit is contained in:
@@ -4,6 +4,7 @@ import { BoxSelect } from "./boxselect";
|
||||
import { MapContextMenu, SpawnOptions } from "../controls/mapcontextmenu";
|
||||
import { UnitContextMenu } from "../controls/unitcontextmenu";
|
||||
import { AirbaseContextMenu } from "../controls/airbasecontextmenu";
|
||||
import { Dropdown } from "../controls/dropdown";
|
||||
|
||||
export const IDLE = "IDLE";
|
||||
export const MOVE_UNIT = "MOVE_UNIT";
|
||||
@@ -21,6 +22,8 @@ export class Map extends L.Map {
|
||||
#unitContextMenu: UnitContextMenu = new UnitContextMenu("unit-contextmenu");
|
||||
#airbaseContextMenu: AirbaseContextMenu = new AirbaseContextMenu("airbase-contextmenu");
|
||||
|
||||
#mapSourceDropdown: Dropdown;
|
||||
|
||||
constructor(ID: string) {
|
||||
/* Init the leaflet map */
|
||||
//@ts-ignore
|
||||
@@ -40,6 +43,8 @@ export class Map extends L.Map {
|
||||
this.on('mousedown', (e: any) => this.#onMouseDown(e));
|
||||
this.on('mouseup', (e: any) => this.#onMouseUp(e));
|
||||
this.on('mousemove', (e: any) => this.#onMouseMove(e));
|
||||
|
||||
this.#mapSourceDropdown = new Dropdown("map-type", (layerName: string) => this.setLayer(layerName), this.getLayers())
|
||||
}
|
||||
|
||||
setLayer(layerName: string) {
|
||||
|
||||
@@ -18,7 +18,7 @@ export class Airbase extends L.Marker
|
||||
|
||||
this.#name = options.name;
|
||||
var icon = new L.DivIcon({
|
||||
html: ` <div class="airbase" data-object="airbase" data-coalition="red">
|
||||
html: ` <div class="airbase" data-object="airbase" data-coalition="neutral">
|
||||
<div class="airbase-marker"> </div>
|
||||
</div>`,
|
||||
className: 'leaflet-airbase-marker',
|
||||
@@ -31,7 +31,7 @@ export class Airbase extends L.Marker
|
||||
setCoalition(coalition: string)
|
||||
{
|
||||
this.#coalition = coalition;
|
||||
this.getElement()?.setAttribute("data-coalition", this.#coalition);
|
||||
(<HTMLElement> this.getElement()?.querySelector(".airbase")).dataset.coalition = this.#coalition;
|
||||
}
|
||||
|
||||
getName()
|
||||
|
||||
Reference in New Issue
Block a user