mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
fix(mouseinfopanel): switched to right mouse button to copy coordinates, added tip
This commit is contained in:
parent
e273203629
commit
b61289d996
@ -88,11 +88,9 @@
|
||||
<div id="unit-position-utm-easting" class="coordinates copyable" data-location-system="UTM"></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="mouse-tool-item">
|
||||
<div id="ref-unit-position-elevation" data-label="H"></div>
|
||||
<div id="unit-position-elevation" class="elevation copyable" data-value="---"></div>
|
||||
</div>
|
||||
<div class="mouse-tool-item">
|
||||
<div id="ref-unit-position-elevation" data-label="H"></div>
|
||||
<div id="unit-position-elevation" class="elevation copyable" data-value="---"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -204,6 +204,11 @@ export class ControlTipsPlugin implements OlympusPlugin {
|
||||
"key": `Period`,
|
||||
"action": "Increase precision",
|
||||
"mouseoverSelector": `#coordinates-tool[data-location-system="MGRS"], #coordinates-tool[data-location-system="MGRS"] *`
|
||||
},
|
||||
{
|
||||
"key": `Mouse2`,
|
||||
"action": "Copy to clipboard",
|
||||
"mouseoverSelector": `#unit-coordinates-container > #unit-coordinates > .mouse-tool-item > .copyable`
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -110,7 +110,7 @@ export class MouseInfoPanel extends Panel {
|
||||
const copyableElements = document.getElementsByClassName('copyable');
|
||||
|
||||
for (const element of copyableElements) {
|
||||
element.addEventListener('click', (ev) => {
|
||||
element.addEventListener('contextmenu', (ev) => {
|
||||
if (!ev.target) return;
|
||||
|
||||
const el = ev.target as HTMLElement;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user