mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Modified website to keep camera link if dropped
This commit is contained in:
parent
4782596e3c
commit
a60f2e7b62
@ -689,7 +689,7 @@ nav.ol-panel {
|
||||
stroke: white !important;
|
||||
}
|
||||
|
||||
.ol-navbar-buttons-group button.off.red svg *[fill="black"] {
|
||||
.ol-navbar-buttons-group button.red svg *[fill="black"] {
|
||||
fill: red !important;
|
||||
}
|
||||
|
||||
|
||||
@ -223,15 +223,15 @@ export class Map extends L.Map {
|
||||
})
|
||||
|
||||
document.addEventListener("toggleCameraLinkStatus", () => {
|
||||
if (this.#slaveDCSCameraAvailable) {
|
||||
// if (this.#slaveDCSCameraAvailable) { // Commented to experiment with usability
|
||||
this.setSlaveDCSCamera(!this.#slaveDCSCamera);
|
||||
}
|
||||
// }
|
||||
})
|
||||
|
||||
document.addEventListener("slewCameraToPosition", () => {
|
||||
if (this.#slaveDCSCameraAvailable) {
|
||||
// if (this.#slaveDCSCameraAvailable) { // Commented to experiment with usability
|
||||
this.#broadcastPosition();
|
||||
}
|
||||
// }
|
||||
})
|
||||
|
||||
/* Pan interval */
|
||||
@ -571,13 +571,13 @@ export class Map extends L.Map {
|
||||
}
|
||||
|
||||
setSlaveDCSCamera(newSlaveDCSCamera: boolean) {
|
||||
if (this.#slaveDCSCameraAvailable || !newSlaveDCSCamera) {
|
||||
// if (this.#slaveDCSCameraAvailable || !newSlaveDCSCamera) { // Commented to experiment with usability
|
||||
this.#slaveDCSCamera = newSlaveDCSCamera;
|
||||
let button = document.getElementById("camera-link-control");
|
||||
button?.classList.toggle("off", !newSlaveDCSCamera);
|
||||
if (newSlaveDCSCamera)
|
||||
this.#broadcastPosition();
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
setCameraControlMode(newCameraControlMode: string) {
|
||||
@ -970,7 +970,7 @@ export class Map extends L.Map {
|
||||
let linkButton = document.getElementById("camera-link-control");
|
||||
if (linkButton) {
|
||||
if (!newSlaveDCSCameraAvailable) {
|
||||
this.setSlaveDCSCamera(false);
|
||||
//this.setSlaveDCSCamera(false); // Commented to experiment with usability
|
||||
linkButton.classList.add("red");
|
||||
linkButton.title = "Camera link to DCS is not available";
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user