mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
feat(map): click selected unit coordinates panel will now change location system
This commit is contained in:
parent
b61289d996
commit
2cadebcabd
@ -115,6 +115,7 @@
|
||||
}
|
||||
|
||||
#unit-coordinates[data-location-system] [data-location-system] {
|
||||
cursor:pointer;
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
||||
@ -205,6 +205,11 @@ export class ControlTipsPlugin implements OlympusPlugin {
|
||||
"action": "Increase precision",
|
||||
"mouseoverSelector": `#coordinates-tool[data-location-system="MGRS"], #coordinates-tool[data-location-system="MGRS"] *`
|
||||
},
|
||||
{
|
||||
"key": `Mouse1 or Z`,
|
||||
"action": "Change location system",
|
||||
"mouseoverSelector": "#unit-coordinates *"
|
||||
},
|
||||
{
|
||||
"key": `Mouse2`,
|
||||
"action": "Copy to clipboard",
|
||||
|
||||
@ -83,6 +83,12 @@ export class MouseInfoPanel extends Panel {
|
||||
/* Selected unit coordinates panel interaction */
|
||||
this.#unitCoordinatesElement = <HTMLElement>this.getElement().querySelector( '#unit-coordinates' );
|
||||
|
||||
this.#unitCoordinatesElement.addEventListener( "click", ( ev:MouseEvent ) => {
|
||||
console.log('cliccato elemento unit coordinates');
|
||||
|
||||
this.#changeLocationSystem();
|
||||
});
|
||||
|
||||
const unitCoordsToggleEl = <HTMLElement>this.getElement().querySelector('#unit-coordinates-toggle');
|
||||
const unitCoordsContainer = <HTMLElement>this.getElement().querySelector('#unit-coordinates-container');
|
||||
unitCoordsToggleEl.addEventListener("click", (ev: MouseEvent) => {
|
||||
@ -129,7 +135,7 @@ export class MouseInfoPanel extends Panel {
|
||||
|
||||
navigator.clipboard.writeText(text)
|
||||
.then(() => {
|
||||
console.log('Testo copiato negli appunti!');
|
||||
//console.log('Testo copiato negli appunti!');
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('Errore nel copiare:', err);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user