Changed events to use pre-existing names

This commit is contained in:
PeekabooSteam
2023-08-14 23:12:14 +01:00
parent 94b8a9270d
commit 06e1cbeb7e
2 changed files with 5 additions and 7 deletions

View File

@@ -721,15 +721,13 @@ export class Unit extends CustomMarker {
// Tell everyone a unit (de-)selection has happened, usually a panel or something.
const detail = {
"detail": {
"unit": this
}
"detail": this
};
if ( unitIsSelected ) {
document.dispatchEvent( new CustomEvent( "unitSelected", detail ) );
document.dispatchEvent( new CustomEvent( "unitSelection", detail ) );
} else {
document.dispatchEvent( new CustomEvent( "unitDeselected", detail ) );
document.dispatchEvent( new CustomEvent( "unitDeselection", detail ) );
}
}