mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
fix(cctv): keep the Context camera card's still and tidy the visibility port
The still preview gate looked only at the CCTV panel, so the Context camera card, which reads the same frame, stopped updating while the panel was collapsed or another phone sheet was open. A mounted card now counts itself in the CCTV store, and the still is requested while the panel or a card is shown; live video still follows the panel only. Review follow-ups in the same area: - visiblePoints is registered once, in createCesiumPorts, and drops checks for input that cannot happen; the contract documents horizonMarginM and when it answers false or null. - The layer passes the mount and the four corners once each and asks findCamera for the port. - Phone sheet names come from a shared module instead of literals. - Layer tests cover the fetch gate; the geometry cases moved to the camera port tests. Comments and CURRENT-STATE match the code.
This commit is contained in:
1 parent
b020a1cd91
commit
99a70a0e0c
18 files changed
+545
-430
No files matched your search
@@ -20,6 +20,8 @@ export const useCctvStore = defineStore('gev-cctv', () => {
|
||||
|
||||
/** The preview: requested and shown frame, loading and error state. */
|
||||
const frame = shallowRef(null);
|
||||
/** Number of camera cards outside the panel showing its preview, including Context's card. */
|
||||
const previewCards = shallowRef(0);
|
||||
/** Whether the live video surface replaces the still frame. */
|
||||
const live = shallowRef(false);
|
||||
/** `{label, state}` for the source badge; null until first synced. */
|
||||
@@ -49,6 +51,11 @@ export const useCctvStore = defineStore('gev-cctv', () => {
|
||||
frame.value = markRaw(next);
|
||||
}
|
||||
|
||||
/** @param {boolean} shown */
|
||||
function showPreviewCard(shown) {
|
||||
previewCards.value = Math.max(0, previewCards.value + (shown ? 1 : -1));
|
||||
}
|
||||
|
||||
/** @param {boolean} on */
|
||||
function setLive(on) {
|
||||
live.value = Boolean(on);
|
||||
@@ -73,6 +80,7 @@ export const useCctvStore = defineStore('gev-cctv', () => {
|
||||
view,
|
||||
calEdit,
|
||||
frame,
|
||||
previewCards,
|
||||
live,
|
||||
sourceBadge,
|
||||
summary,
|
||||
@@ -80,6 +88,7 @@ export const useCctvStore = defineStore('gev-cctv', () => {
|
||||
publish,
|
||||
setCalEdit,
|
||||
setFrame,
|
||||
showPreviewCard,
|
||||
setLive,
|
||||
setSourceBadge,
|
||||
setSummary,
|
||||
|
||||
Reference in new issue
Block a user