mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Fixed destination preview handle showing incorrectly
This commit is contained in:
@@ -751,11 +751,16 @@ export class Map extends L.Map {
|
|||||||
const singleCursor = !this.#shiftKey;
|
const singleCursor = !this.#shiftKey;
|
||||||
const selectedUnitsCount = getApp().getUnitsManager().getSelectedUnits({ excludeHumans: true, onlyOnePerGroup: true }).length;
|
const selectedUnitsCount = getApp().getUnitsManager().getSelectedUnits({ excludeHumans: true, onlyOnePerGroup: true }).length;
|
||||||
if (selectedUnitsCount > 0) {
|
if (selectedUnitsCount > 0) {
|
||||||
if (singleCursor && this.#destinationPreviewCursors.length != 1) {
|
if (singleCursor) {
|
||||||
this.#hideDestinationCursors();
|
if ( this.#destinationPreviewCursors.length != 1) {
|
||||||
var marker = new DestinationPreviewMarker(this.getMouseCoordinates(), { interactive: false });
|
this.#hideDestinationCursors();
|
||||||
marker.addTo(this);
|
var marker = new DestinationPreviewMarker(this.getMouseCoordinates(), { interactive: false });
|
||||||
this.#destinationPreviewCursors = [marker];
|
marker.addTo(this);
|
||||||
|
this.#destinationPreviewCursors = [marker];
|
||||||
|
}
|
||||||
|
|
||||||
|
this.#destinationPreviewHandleLine.removeFrom(this);
|
||||||
|
this.#destinationPreviewHandle.removeFrom(this);
|
||||||
}
|
}
|
||||||
else if (!singleCursor) {
|
else if (!singleCursor) {
|
||||||
while (this.#destinationPreviewCursors.length > selectedUnitsCount) {
|
while (this.#destinationPreviewCursors.length > selectedUnitsCount) {
|
||||||
|
|||||||
@@ -63,14 +63,14 @@
|
|||||||
|
|
||||||
<div id="tanker-on" class="switch-control">
|
<div id="tanker-on" class="switch-control">
|
||||||
<h4>Enable tanker</h4>
|
<h4>Enable tanker</h4>
|
||||||
<div id="tanker-on-switch" class="ol-switch"></div>
|
<div id="tanker-on-switch" class="ol-switch" title="Enables the ability to operate as air to air refueling tanker. A/A TACAN, radio frequency and callsign set in Settings dialog."></div>
|
||||||
<div>Instructs the unit to operate as AAR tanker. More options available in Settings dialog.</div>
|
<div>Instructs the unit to operate as AAR tanker. More options available in Settings dialog.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="AWACS-on" class="switch-control">
|
<div id="AWACS-on" class="switch-control">
|
||||||
<h4>Enable AWACS</h4>
|
<h4>Airborne Early Warning</h4>
|
||||||
<div id="AWACS-on-switch" class="ol-switch"></div>
|
<div id="AWACS-on-switch" class="ol-switch" title="Enables datalink and AI radio calls. The unit will operate as Overlord. Radio frequency and callsign set in Settings dialog."></div>
|
||||||
<div>Instructs the unit to operate as AWACS. More options available in Settings dialog.</div>
|
<div>Instructs the unit to operate as airborne early warning. More options available in Settings dialog.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="operate-as" class="switch-control">
|
<div id="operate-as" class="switch-control">
|
||||||
|
|||||||
Reference in New Issue
Block a user