mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
More work on responsive design for small screens
This commit is contained in:
@@ -377,7 +377,6 @@ export abstract class Unit extends CustomMarker {
|
||||
/* Leaflet events listeners */
|
||||
this.on("click", (e) => this.#onClick(e));
|
||||
this.on("dblclick", (e) => this.#onDoubleClick(e));
|
||||
this.on("contextmenu", (e) => this.#onContextMenu(e));
|
||||
this.on("mouseover", () => {
|
||||
if (this.belongsToCommandedCoalition()) {
|
||||
this.setHighlighted(true);
|
||||
@@ -1558,24 +1557,6 @@ export abstract class Unit extends CustomMarker {
|
||||
});
|
||||
}
|
||||
|
||||
#onContextMenu(e: any) {
|
||||
var contextActionSet = new ContextActionSet();
|
||||
|
||||
var units = getApp().getUnitsManager().getSelectedUnits();
|
||||
if (!units.includes(this)) units.push(this);
|
||||
|
||||
units.forEach((unit: Unit) => {
|
||||
unit.appendContextActions(contextActionSet);
|
||||
});
|
||||
|
||||
if (Object.keys(contextActionSet.getContextActions()).length > 0) {
|
||||
getApp()
|
||||
.getMap()
|
||||
.showUnitContextMenu(e.originalEvent.x, e.originalEvent.y, e.latlng);
|
||||
//getApp().getMap().getUnitContextMenu().setContextActions(contextActionSet);
|
||||
}
|
||||
}
|
||||
|
||||
#updateMarker() {
|
||||
this.updateVisibility();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user