Refined the options a bit.

This commit is contained in:
PeekabooSteam
2023-09-14 20:56:34 +01:00
parent 7f75905d5d
commit 01b30ccf12
3 changed files with 88 additions and 19 deletions

View File

@@ -66,6 +66,12 @@ export class Airbase extends CustomMarker {
img.onload = () => SVGInjector(img);
el.appendChild(img);
this.getElement()?.appendChild(el);
el.addEventListener( "mouseover", ( ev ) => {
document.dispatchEvent( new CustomEvent( "airbaseMouseover", { detail: this }));
});
el.addEventListener( "mouseout", ( ev ) => {
document.dispatchEvent( new CustomEvent( "airbaseMouseout", { detail: this }));
});
el.dataset.coalition = this.#coalition;
}