mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Make non-interactive map elements unobstructive.
This makes most of the lines and polygons on the map non-interactive so they don't capture mouse events, and also makes the culling exclusion zones unfilled so they don't obscure real map objects in dense areas. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1217
This commit is contained in:
parent
3bb974b9e0
commit
f727712bfa
@ -19,6 +19,7 @@ Saves from 3.x are not compatible with 4.0.
|
|||||||
|
|
||||||
* **[Campaign AI]** Fix procurement for factions that lack some unit types.
|
* **[Campaign AI]** Fix procurement for factions that lack some unit types.
|
||||||
* **[Mission Generation]** Fixed problem with mission load when control point name contained an apostrophe.
|
* **[Mission Generation]** Fixed problem with mission load when control point name contained an apostrophe.
|
||||||
|
* **[UI]** Made non-interactive map elements less obstructive.
|
||||||
|
|
||||||
# 3.0.0
|
# 3.0.0
|
||||||
|
|
||||||
|
|||||||
@ -428,6 +428,7 @@ class ControlPoint {
|
|||||||
return L.polyline([this.cp.position, destination], {
|
return L.polyline([this.cp.position, destination], {
|
||||||
color: Colors.Green,
|
color: Colors.Green,
|
||||||
weight: 1,
|
weight: 1,
|
||||||
|
interactive: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -519,6 +520,7 @@ class TheaterGroundObject {
|
|||||||
color: detectionColor,
|
color: detectionColor,
|
||||||
fill: false,
|
fill: false,
|
||||||
weight: 1,
|
weight: 1,
|
||||||
|
interactive: false,
|
||||||
}).addTo(detectionLayer);
|
}).addTo(detectionLayer);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -528,6 +530,7 @@ class TheaterGroundObject {
|
|||||||
color: threatColor,
|
color: threatColor,
|
||||||
fill: false,
|
fill: false,
|
||||||
weight: 2,
|
weight: 2,
|
||||||
|
interactive: false,
|
||||||
}).addTo(threatLayer);
|
}).addTo(threatLayer);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -737,12 +740,15 @@ class Flight {
|
|||||||
const color = this.flight.blue ? Colors.Blue : Colors.Red;
|
const color = this.flight.blue ? Colors.Blue : Colors.Red;
|
||||||
const layer = this.flightPlanLayer();
|
const layer = this.flightPlanLayer();
|
||||||
if (this.flight.selected) {
|
if (this.flight.selected) {
|
||||||
this.path = L.polyline(path, { color: Colors.Highlight })
|
this.path = L.polyline(path, {
|
||||||
|
color: Colors.Highlight,
|
||||||
|
interactive: false,
|
||||||
|
})
|
||||||
.addTo(selectedFlightPlansLayer)
|
.addTo(selectedFlightPlansLayer)
|
||||||
.addTo(layer)
|
.addTo(layer)
|
||||||
.addTo(allFlightPlansLayer);
|
.addTo(allFlightPlansLayer);
|
||||||
} else {
|
} else {
|
||||||
this.path = L.polyline(path, { color: color })
|
this.path = L.polyline(path, { color: color, interactive: false })
|
||||||
.addTo(layer)
|
.addTo(layer)
|
||||||
.addTo(allFlightPlansLayer);
|
.addTo(allFlightPlansLayer);
|
||||||
}
|
}
|
||||||
@ -760,6 +766,7 @@ class Flight {
|
|||||||
this.commitBoundary = L.polyline(this.flight.commitBoundary, {
|
this.commitBoundary = L.polyline(this.flight.commitBoundary, {
|
||||||
color: Colors.Highlight,
|
color: Colors.Highlight,
|
||||||
weight: 1,
|
weight: 1,
|
||||||
|
interactive: false,
|
||||||
})
|
})
|
||||||
.addTo(selectedFlightPlansLayer)
|
.addTo(selectedFlightPlansLayer)
|
||||||
.addTo(this.flightPlanLayer())
|
.addTo(this.flightPlanLayer())
|
||||||
@ -819,6 +826,7 @@ function _drawThreatZones(zones, layer, player) {
|
|||||||
fill: true,
|
fill: true,
|
||||||
fillOpacity: 0.4,
|
fillOpacity: 0.4,
|
||||||
noClip: true,
|
noClip: true,
|
||||||
|
interactive: false,
|
||||||
}).addTo(layer);
|
}).addTo(layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -874,6 +882,7 @@ function drawNavmesh(zones, layer) {
|
|||||||
color: "#000000",
|
color: "#000000",
|
||||||
weight: 1,
|
weight: 1,
|
||||||
fill: false,
|
fill: false,
|
||||||
|
interactive: false,
|
||||||
}).addTo(layer);
|
}).addTo(layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -896,6 +905,7 @@ function drawMapZones() {
|
|||||||
color: "#344455",
|
color: "#344455",
|
||||||
fillColor: "#344455",
|
fillColor: "#344455",
|
||||||
fillOpacity: 1,
|
fillOpacity: 1,
|
||||||
|
interactive: false,
|
||||||
}).addTo(seaZones);
|
}).addTo(seaZones);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -904,6 +914,7 @@ function drawMapZones() {
|
|||||||
color: "#969696",
|
color: "#969696",
|
||||||
fillColor: "#4b4b4b",
|
fillColor: "#4b4b4b",
|
||||||
fillOpacity: 1,
|
fillOpacity: 1,
|
||||||
|
interactive: false,
|
||||||
}).addTo(inclusionZones);
|
}).addTo(inclusionZones);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -912,6 +923,7 @@ function drawMapZones() {
|
|||||||
color: "#969696",
|
color: "#969696",
|
||||||
fillColor: "#303030",
|
fillColor: "#303030",
|
||||||
fillOpacity: 1,
|
fillOpacity: 1,
|
||||||
|
interactive: false,
|
||||||
}).addTo(exclusionZones);
|
}).addTo(exclusionZones);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -923,7 +935,8 @@ function drawUnculledZones() {
|
|||||||
L.circle(zone.position, {
|
L.circle(zone.position, {
|
||||||
radius: zone.radius,
|
radius: zone.radius,
|
||||||
color: "#b4ff8c",
|
color: "#b4ff8c",
|
||||||
stroke: false,
|
fill: false,
|
||||||
|
interactive: false,
|
||||||
}).addTo(unculledZones);
|
}).addTo(unculledZones);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user