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:
@@ -689,7 +689,7 @@ nav.ol-panel {
|
|||||||
stroke: white !important;
|
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;
|
fill: red !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -223,15 +223,15 @@ export class Map extends L.Map {
|
|||||||
})
|
})
|
||||||
|
|
||||||
document.addEventListener("toggleCameraLinkStatus", () => {
|
document.addEventListener("toggleCameraLinkStatus", () => {
|
||||||
if (this.#slaveDCSCameraAvailable) {
|
// if (this.#slaveDCSCameraAvailable) { // Commented to experiment with usability
|
||||||
this.setSlaveDCSCamera(!this.#slaveDCSCamera);
|
this.setSlaveDCSCamera(!this.#slaveDCSCamera);
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
|
|
||||||
document.addEventListener("slewCameraToPosition", () => {
|
document.addEventListener("slewCameraToPosition", () => {
|
||||||
if (this.#slaveDCSCameraAvailable) {
|
// if (this.#slaveDCSCameraAvailable) { // Commented to experiment with usability
|
||||||
this.#broadcastPosition();
|
this.#broadcastPosition();
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
|
|
||||||
/* Pan interval */
|
/* Pan interval */
|
||||||
@@ -571,13 +571,13 @@ export class Map extends L.Map {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setSlaveDCSCamera(newSlaveDCSCamera: boolean) {
|
setSlaveDCSCamera(newSlaveDCSCamera: boolean) {
|
||||||
if (this.#slaveDCSCameraAvailable || !newSlaveDCSCamera) {
|
// if (this.#slaveDCSCameraAvailable || !newSlaveDCSCamera) { // Commented to experiment with usability
|
||||||
this.#slaveDCSCamera = newSlaveDCSCamera;
|
this.#slaveDCSCamera = newSlaveDCSCamera;
|
||||||
let button = document.getElementById("camera-link-control");
|
let button = document.getElementById("camera-link-control");
|
||||||
button?.classList.toggle("off", !newSlaveDCSCamera);
|
button?.classList.toggle("off", !newSlaveDCSCamera);
|
||||||
if (newSlaveDCSCamera)
|
if (newSlaveDCSCamera)
|
||||||
this.#broadcastPosition();
|
this.#broadcastPosition();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
setCameraControlMode(newCameraControlMode: string) {
|
setCameraControlMode(newCameraControlMode: string) {
|
||||||
@@ -970,7 +970,7 @@ export class Map extends L.Map {
|
|||||||
let linkButton = document.getElementById("camera-link-control");
|
let linkButton = document.getElementById("camera-link-control");
|
||||||
if (linkButton) {
|
if (linkButton) {
|
||||||
if (!newSlaveDCSCameraAvailable) {
|
if (!newSlaveDCSCameraAvailable) {
|
||||||
this.setSlaveDCSCamera(false);
|
//this.setSlaveDCSCamera(false); // Commented to experiment with usability
|
||||||
linkButton.classList.add("red");
|
linkButton.classList.add("red");
|
||||||
linkButton.title = "Camera link to DCS is not available";
|
linkButton.title = "Camera link to DCS is not available";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user