Fixed icon anchor, still needs correction

This commit is contained in:
dpassoni
2023-03-07 15:39:06 +01:00
parent 10e0abfad3
commit 39d3877b00
2 changed files with 2 additions and 3 deletions

View File

@@ -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");

View File

@@ -77,7 +77,7 @@ export class Unit extends Marker {
</div>
`,
className: 'ol-unit-marker',
iconAnchor: [60, 60]
iconAnchor: [0, 0]
});
this.setIcon(icon);