mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Fixed icon anchor, still needs correction
This commit is contained in:
@@ -40,7 +40,7 @@ export class UnitControlPanel extends Panel {
|
||||
this.getElement().querySelector("#roe-buttons-container")?.append(...this.#optionButtons["ROE"]);
|
||||
this.getElement().querySelector("#reaction-to-threat-buttons-container")?.append(...this.#optionButtons["reactionToThreat"]);
|
||||
|
||||
document.addEventListener("unitsSelection", (e: CustomEvent<Unit[]>) => {console.log("Select"); this.show(); this.update(e.detail)});
|
||||
document.addEventListener("unitsSelection", (e: CustomEvent<Unit[]>) => {this.show(); this.update(e.detail)});
|
||||
document.addEventListener("clearSelection", () => {this.hide()});
|
||||
|
||||
this.hide();
|
||||
@@ -50,7 +50,6 @@ export class UnitControlPanel extends Panel {
|
||||
if (this.getElement() != null)
|
||||
{
|
||||
this.#showFlightControlSliders(units);
|
||||
console.log( this.getElement().querySelector("#selected-units-container") );
|
||||
this.getElement().querySelector("#selected-units-container")?.replaceChildren(...units.map((unit: Unit) =>
|
||||
{
|
||||
var button = document.createElement("button");
|
||||
|
||||
@@ -77,7 +77,7 @@ export class Unit extends Marker {
|
||||
</div>
|
||||
`,
|
||||
className: 'ol-unit-marker',
|
||||
iconAnchor: [60, 60]
|
||||
iconAnchor: [0, 0]
|
||||
});
|
||||
this.setIcon(icon);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user