Commit the shown CCTV camera with FOCUS, not a hidden picker option

The picker no longer keeps a hidden, disabled copy of the opening camera.
That copy could be re-picked with ArrowDown on a closed list, could show
twice in the iOS picker, and left Firefox without an accessible value.
The list now selects the camera's own option, as before. A native list
sends no change for the option it already shows, so FOCUS (or NEAREST,
when that camera is the nearest) keeps the shown camera. Closing the list
without a choice keeps automatic selection.
This commit is contained in:
German Khokhlov committed 2026-11-20 12:55:52 +04:00
1 parent a6eecee157
commit 09588b98bf
13 files changed
+56 -105

No files matched your search

+3 -6
View File
@@ -73,17 +73,14 @@ export function createSelection({
record,
)
) {
// Picking the camera a settled move re-opened is still a choice: later
// settled moves must leave it alone, and the picker learns it.
const endsOpening = layerState._openingCameraProvisional && !opening;
if (endsOpening) layerState._openingCameraProvisional = false;
// Picking the camera a settled move re-opened is still a pick: later
// settled moves must leave it alone.
if (!opening) layerState._openingCameraProvisional = false;
// Browser-only feeds have a separate player; a reselect retries it
// without re-running activation or touching the projection geometry.
if (parts.model.isBrowserOverlayCamera(record.camera)) {
layerState._activeCameraReselection += 1;
parts.presentation.notifyListeners();
} else if (endsOpening) {
parts.presentation.notifyListeners();
}
return CCTV_ACTIVATION_RESULT.UNCHANGED;
}