refactor: isolate Radio controls and tuner presentation

This commit is contained in:
Sameh Khamis committed 2026-09-12 23:23:20 -07:00
1 parent 79a0f09087
commit 7b9aca8597
21 files changed
+1507 -1134

No files matched your search

+7 -1
View File
@@ -166,5 +166,11 @@
"src/locationStatus.js",
"src/ui/locationControls.test.mjs",
"src/ui/locationSearch.test.mjs",
"scripts/qa-location-controls.mjs"
"scripts/qa-location-controls.mjs",
"src/ui/radio.js",
"src/ui/radioControls.js",
"src/ui/radioBindings.js",
"src/ui/radioPresentation.js",
"src/ui/radioTunerModel.js",
"src/ui/radioControls.test.mjs"
]
+173 -52
View File
@@ -10,27 +10,47 @@
"src/data/localGeojsonCore.js",
"src/data/localGeojsonLod.js"
],
"external": ["cesium"]
"external": [
"cesium"
]
},
"application": {
"exports": ["./application"],
"modules": ["src/app/application.js"],
"exports": [
"./application"
],
"modules": [
"src/app/application.js"
],
"external": []
},
"viewer": {
"exports": ["./application/viewer"],
"modules": ["src/app/viewer.js"],
"external": ["cesium"]
"exports": [
"./application/viewer"
],
"modules": [
"src/app/viewer.js"
],
"external": [
"cesium"
]
},
"vite-build": {
"runtime": "node",
"exports": ["./build/vite"],
"modules": ["build/vite.js"],
"external": ["vite-plugin-cesium"]
"exports": [
"./build/vite"
],
"modules": [
"build/vite.js"
],
"external": [
"vite-plugin-cesium"
]
},
"live-providers": {
"runtime": "node",
"exports": ["./server/providers/live"],
"exports": [
"./server/providers/live"
],
"modules": [
"server/providers/live.js",
"server/providers/common/http.js",
@@ -45,16 +65,24 @@
"src/data/aisStreamAdapter.js",
"src/data/aisWatchdog.js"
],
"external": ["ws"]
"external": [
"ws"
]
},
"adsb-lol-source": {
"exports": ["./sources/adsb-lol"],
"modules": ["src/data/adsbLolFallback.js"],
"exports": [
"./sources/adsb-lol"
],
"modules": [
"src/data/adsbLolFallback.js"
],
"external": []
},
"place-providers": {
"runtime": "node",
"exports": ["./server/providers/places"],
"exports": [
"./server/providers/places"
],
"modules": [
"server/providers/places.js",
"server/providers/places/google.js",
@@ -69,13 +97,19 @@
"external": []
},
"place-payloads": {
"exports": ["./sources/places"],
"modules": ["src/data/placeProviderPayloads.js"],
"exports": [
"./sources/places"
],
"modules": [
"src/data/placeProviderPayloads.js"
],
"external": []
},
"space-providers": {
"runtime": "node",
"exports": ["./server/providers/space"],
"exports": [
"./server/providers/space"
],
"modules": [
"server/providers/space.js",
"server/providers/space/celestrak.js",
@@ -86,13 +120,19 @@
"external": []
},
"space-requests": {
"exports": ["./sources/space"],
"modules": ["src/data/spaceProviderRequests.js"],
"exports": [
"./sources/space"
],
"modules": [
"src/data/spaceProviderRequests.js"
],
"external": []
},
"terrain-provider": {
"runtime": "node",
"exports": ["./server/providers/terrain"],
"exports": [
"./server/providers/terrain"
],
"modules": [
"server/providers/terrain.js",
"src/data/terrainHeightsProxy.js"
@@ -100,30 +140,50 @@
"external": []
},
"terrain-source": {
"exports": ["./sources/terrain"],
"modules": ["src/data/terrainHeightsProxy.js"],
"exports": [
"./sources/terrain"
],
"modules": [
"src/data/terrainHeightsProxy.js"
],
"external": []
},
"traffic-provider": {
"runtime": "node",
"exports": ["./server/providers/traffic"],
"modules": ["server/providers/traffic.js", "src/data/tomtomTiles.js"],
"exports": [
"./server/providers/traffic"
],
"modules": [
"server/providers/traffic.js",
"src/data/tomtomTiles.js"
],
"external": []
},
"traffic-source": {
"exports": ["./sources/traffic"],
"modules": ["src/data/tomtomTiles.js"],
"exports": [
"./sources/traffic"
],
"modules": [
"src/data/tomtomTiles.js"
],
"external": []
},
"firms-provider": {
"runtime": "node",
"exports": ["./server/providers/firms"],
"modules": ["server/providers/firms.js", "src/data/firmsCsv.js"],
"exports": [
"./server/providers/firms"
],
"modules": [
"server/providers/firms.js",
"src/data/firmsCsv.js"
],
"external": []
},
"gbfs-provider": {
"runtime": "node",
"exports": ["./server/providers/gbfs"],
"exports": [
"./server/providers/gbfs"
],
"modules": [
"server/providers/gbfs.js",
"server/providers/common/http.js",
@@ -132,13 +192,19 @@
"external": []
},
"gbfs-source": {
"exports": ["./sources/gbfs"],
"modules": ["src/data/gbfsSource.js"],
"exports": [
"./sources/gbfs"
],
"modules": [
"src/data/gbfsSource.js"
],
"external": []
},
"cctv-provider": {
"runtime": "node",
"exports": ["./server/providers/cctv"],
"exports": [
"./server/providers/cctv"
],
"modules": [
"server/providers/cctv.js",
"server/providers/cctv/catalog.js",
@@ -155,7 +221,9 @@
},
"radio-provider": {
"runtime": "node",
"exports": ["./server/providers/radio"],
"exports": [
"./server/providers/radio"
],
"modules": [
"server/providers/radio.js",
"server/providers/radio/catalog.js",
@@ -169,7 +237,9 @@
},
"overpass-provider": {
"runtime": "node",
"exports": ["./server/providers/overpass"],
"exports": [
"./server/providers/overpass"
],
"modules": [
"server/providers/common/geo.js",
"server/providers/common/http.js",
@@ -188,7 +258,9 @@
},
"military-installations-provider": {
"runtime": "node",
"exports": ["./server/providers/military-installations"],
"exports": [
"./server/providers/military-installations"
],
"modules": [
"server/providers/common/http.js",
"server/providers/common/query.js",
@@ -205,7 +277,9 @@
},
"regional-provider": {
"runtime": "node",
"exports": ["./server/providers/regional"],
"exports": [
"./server/providers/regional"
],
"modules": [
"server/providers/common/http.js",
"server/providers/common/query.js",
@@ -224,7 +298,9 @@
},
"openai-provider": {
"runtime": "node",
"exports": ["./server/providers/openai"],
"exports": [
"./server/providers/openai"
],
"modules": [
"server/providers/common/rate-limit.js",
"server/providers/common/request.js",
@@ -244,7 +320,9 @@
},
"standalone-key-setup": {
"runtime": "node",
"exports": ["./server/standalone/key-setup"],
"exports": [
"./server/standalone/key-setup"
],
"modules": [
"scripts/pinokio-environment.mjs",
"server/providers/common/source-root.js",
@@ -255,7 +333,9 @@
"external": []
},
"place-search": {
"exports": ["./search"],
"exports": [
"./search"
],
"modules": [
"src/search/index.js",
"src/search/placeSearch.js",
@@ -265,17 +345,27 @@
"external": []
},
"panel-disclosure": {
"exports": ["./ui/panels"],
"modules": ["src/ui/panelDisclosure.js"],
"exports": [
"./ui/panels"
],
"modules": [
"src/ui/panelDisclosure.js"
],
"external": []
},
"surface-keyboard": {
"exports": ["./ui/surfaces"],
"modules": ["src/ui/surfaceKeyboard.js"],
"exports": [
"./ui/surfaces"
],
"modules": [
"src/ui/surfaceKeyboard.js"
],
"external": []
},
"panel-rail-layout": {
"exports": ["./ui/layout"],
"exports": [
"./ui/layout"
],
"modules": [
"src/ui/panelRails.js",
"src/ui/leftPanelRail.js",
@@ -287,7 +377,9 @@
"external": []
},
"visual-input": {
"exports": ["./ui/input"],
"exports": [
"./ui/input"
],
"modules": [
"src/ui/visualInput.js",
"src/ui/applicationShortcuts.js",
@@ -296,12 +388,19 @@
"external": []
},
"display-controls": {
"exports": ["./ui/display"],
"modules": ["src/ui/displayControls.js"],
"exports": [
"./ui/display"
],
"modules": [
"src/ui/displayControls.js"
],
"external": []
},
"visual-effects": {
"exports": ["./ui/effects", "./ui/effects/bloom"],
"exports": [
"./ui/effects",
"./ui/effects/bloom"
],
"modules": [
"src/ui/effects.js",
"src/ui/visualEffects.js",
@@ -314,10 +413,14 @@
"src/styles/noir.js",
"src/styles/snow.js"
],
"external": ["cesium"]
"external": [
"cesium"
]
},
"map-source-controls": {
"exports": ["./ui/maps"],
"exports": [
"./ui/maps"
],
"modules": [
"src/ui/mapSource.js",
"src/ui/mapSourceControls.js",
@@ -327,7 +430,10 @@
"external": []
},
"layer-panel": {
"exports": ["./ui/layers", "./ui/layers/feedback"],
"exports": [
"./ui/layers",
"./ui/layers/feedback"
],
"modules": [
"src/ui/layers.js",
"src/ui/layerPanel.js",
@@ -338,7 +444,9 @@
"external": []
},
"location-controls": {
"exports": ["./ui/location"],
"exports": [
"./ui/location"
],
"modules": [
"src/ui/location.js",
"src/ui/locationControls.js",
@@ -346,5 +454,18 @@
"src/locationStatus.js"
],
"external": []
},
"radio-controls": {
"exports": [
"./ui/radio"
],
"modules": [
"src/ui/radio.js",
"src/ui/radioControls.js",
"src/ui/radioBindings.js",
"src/ui/radioPresentation.js",
"src/ui/radioTunerModel.js"
],
"external": []
}
}
+52 -52
View File
@@ -281,7 +281,7 @@ async function main() {
fullPlayEnabled: !document.getElementById('radio-play-btn').disabled,
fullPlayLabel: document.getElementById('radio-play-btn').getAttribute('aria-label'),
tunerVisible: !document.getElementById('radio-tuner').hidden,
tunerCount: window.__godsEyeView.styleManager._radioTunerStations.length,
tunerCount: window.__godsEyeView.styleManager._radioControls._radioTunerStations.length,
tunerLabel: document.getElementById('radio-tuner-band-label').textContent,
};
});
@@ -332,19 +332,19 @@ async function main() {
const staticResult = module.setTuningStatic(true);
const filterBefore = module.getUIState().filter;
const filterControl = document.getElementById('radio-filter');
const originalPinned = style._radioTunerBandPinnedForNavigation;
const originalPool = style._radioTunerPool;
style._radioTunerBandPinnedForNavigation = true;
const originalPinned = style._radioControls._radioTunerBandPinnedForNavigation;
const originalPool = style._radioControls._radioTunerPool;
style._radioControls._radioTunerBandPinnedForNavigation = true;
filterControl.value = filterBefore === 'news' ? 'all' : 'news';
filterControl.dispatchEvent(new Event('change', { bubbles: true }));
const rejectedUIFilter = {
moduleFilter: module.getUIState().filter,
controlFilter: filterControl.value,
pinned: style._radioTunerBandPinnedForNavigation,
poolIdentityPreserved: style._radioTunerPool === originalPool,
pinned: style._radioControls._radioTunerBandPinnedForNavigation,
poolIdentityPreserved: style._radioControls._radioTunerPool === originalPool,
};
style._radioTunerBandPinnedForNavigation = originalPinned;
style._radioTunerPool = originalPool;
style._radioControls._radioTunerBandPinnedForNavigation = originalPinned;
style._radioControls._radioTunerPool = originalPool;
const filterResult = module.setFilter('news');
const toggleResult = await module.togglePlayback({ origin: 'user' });
const directSelect = module.selectStation(stationId, {
@@ -2719,7 +2719,7 @@ async function main() {
const dialRect = document.querySelector('.radio-tuner-dial').getBoundingClientRect();
const sliderRect = slider.getBoundingClientRect();
const panelRect = document.querySelector('.radio-panel-inner').getBoundingClientRect();
const count = style._radioTunerStations.length;
const count = style._radioControls._radioTunerStations.length;
const usable = sliderRect.width - 14;
const xFor = (coordinate) => sliderRect.left + 7 + usable * coordinate / Math.max(1, count - 1);
const pointer = (type, x, pointerId = 71) => slider.dispatchEvent(new PointerEvent(type, {
@@ -2745,7 +2745,7 @@ async function main() {
};
};
const playsBefore = window.__qaRadioPlayCalls.length;
const frozenSignature = style._radioTunerBandSignature;
const frozenSignature = style._radioControls._radioTunerBandSignature;
pointer('pointerdown', xFor(0));
const left = snapshot();
const centerCoordinate = (count - 1) / 2;
@@ -2765,14 +2765,14 @@ async function main() {
visible: !document.getElementById('radio-tuner').hidden,
stationCount: count,
sliderMax: Number(slider.max),
bandFrozen: style._radioTunerBandSignature === frozenSignature,
bandFrozen: style._radioControls._radioTunerBandSignature === frozenSignature,
left,
center,
shifted,
right,
leftExpectedId: style._radioTunerStations[0]?.id || null,
centerExpectedId: style._radioTunerStations[Math.floor(centerCoordinate + 0.5)]?.id || null,
rightExpectedId: style._radioTunerStations[count - 1]?.id || null,
leftExpectedId: style._radioControls._radioTunerStations[0]?.id || null,
centerExpectedId: style._radioControls._radioTunerStations[Math.floor(centerCoordinate + 0.5)]?.id || null,
rightExpectedId: style._radioControls._radioTunerStations[count - 1]?.id || null,
centerExpected: Math.floor(centerCoordinate + 0.5),
tapeDelta,
needleDelta,
@@ -2817,7 +2817,7 @@ async function main() {
const slider = document.getElementById('radio-tuner-slider');
// Capture a fresh gesture's complete presentation anchor before moving
// to a different absolute directory station.
const beforeStations = [...style._radioTunerStations];
const beforeStations = [...style._radioControls._radioTunerStations];
const sliderRect = slider.getBoundingClientRect();
const xFor = (index) => sliderRect.left + 7
+ (sliderRect.width - 14) * index / Math.max(1, beforeStations.length - 1);
@@ -2834,7 +2834,7 @@ async function main() {
const flyToCalls = [];
camera.flyTo = (options) => flyToCalls.push(options);
const before = {
signature: style._radioTunerBandSignature,
signature: style._radioControls._radioTunerBandSignature,
ids: beforeStations.map((station) => station.id),
slot: Number(slider.value),
selectedId: radio.getUIState().selected?.id || null,
@@ -2848,10 +2848,10 @@ async function main() {
.find((entity) => String(entity.id).startsWith('radio:selected:'))?.id || null;
const flyToCallsBeforeCancel = flyToCalls.length;
pointer('pointercancel', targetIndex);
const afterStations = style._radioTunerStations;
const afterStations = style._radioControls._radioTunerStations;
const afterState = radio.getUIState();
const after = {
signature: style._radioTunerBandSignature,
signature: style._radioControls._radioTunerBandSignature,
ids: afterStations.map((station) => station.id),
slot: Number(slider.value),
selectedId: afterState.selected?.id || null,
@@ -2972,7 +2972,7 @@ async function main() {
const tunerRefreshTarget = await page.evaluate(() => {
const gev = window.__godsEyeView;
const slider = document.getElementById('radio-tuner-slider');
const stations = gev.styleManager._radioTunerStations;
const stations = gev.styleManager._radioControls._radioTunerStations;
const targetIndex = 1;
const rect = slider.getBoundingClientRect();
const clientX = rect.left + 7 + (rect.width - 14) * targetIndex / Math.max(1, stations.length - 1);
@@ -3055,7 +3055,7 @@ async function main() {
const max = Number(slider.max);
const direction = startSlot < max ? 1 : -1;
const targetIndex = startSlot + direction;
const targetId = gev.styleManager._radioTunerStations[targetIndex]?.id || null;
const targetId = gev.styleManager._radioControls._radioTunerStations[targetIndex]?.id || null;
const rect = slider.getBoundingClientRect();
const xFor = (index) => rect.left + 7 + (rect.width - 14) * index / Math.max(1, max);
const pointer = (type, index) => slider.dispatchEvent(new PointerEvent(type, {
@@ -3106,18 +3106,18 @@ async function main() {
const slider = document.getElementById('radio-tuner-slider');
const targetIndex = 11;
slider.dispatchEvent(new PointerEvent('pointercancel', { bubbles: true, pointerId: 1 }));
const station = gev.styleManager._radioTunerStations[targetIndex];
const station = gev.styleManager._radioControls._radioTunerStations[targetIndex];
const rect = slider.getBoundingClientRect();
const currentRatio = Number(slider.value) / Math.max(1, Number(slider.max));
window.__qaRadioDelayNextPlay = true;
return {
id: station.id,
targetIndex,
count: gev.styleManager._radioTunerStations.length,
frozenSignature: gev.styleManager._radioTunerBandSignature,
count: gev.styleManager._radioControls._radioTunerStations.length,
frozenSignature: gev.styleManager._radioControls._radioTunerBandSignature,
startX: rect.left + 7 + (rect.width - 14) * currentRatio,
targetX: rect.left + 7 + (rect.width - 14) * targetIndex
/ Math.max(1, gev.styleManager._radioTunerStations.length - 1),
/ Math.max(1, gev.styleManager._radioControls._radioTunerStations.length - 1),
y: rect.top + rect.height / 2,
};
});
@@ -3135,11 +3135,11 @@ async function main() {
audioState: state.audioState,
tuningStatic: state.tuningStatic,
awaiting: state.tuningAwaitingStationId,
signatureStable: gev.styleManager._radioTunerBandSignature === target.frozenSignature,
selectedIndex: gev.styleManager._radioTunerStations.findIndex((item) => item.id === state.selected?.id),
signatureStable: gev.styleManager._radioControls._radioTunerBandSignature === target.frozenSignature,
selectedIndex: gev.styleManager._radioControls._radioTunerStations.findIndex((item) => item.id === state.selected?.id),
sliderSlot: Number(slider.value),
ratio: Number(document.getElementById('radio-tuner').style.getPropertyValue('--radio-tuner-ratio')),
pinned: gev.styleManager._radioTunerBandPinnedForNavigation,
pinned: gev.styleManager._radioControls._radioTunerBandPinnedForNavigation,
};
}, tunerCommitTarget);
check(
@@ -3183,7 +3183,7 @@ async function main() {
y: rect.top + rect.height / 2,
ratio,
usableWidth: rect.width - 14,
signature: style._radioTunerBandSignature,
signature: style._radioControls._radioTunerBandSignature,
};
});
const microDragSamples = [];
@@ -3199,7 +3199,7 @@ async function main() {
pixelDelta,
slot: Number(slider.value),
ratio: Number(document.getElementById('radio-tuner').style.getPropertyValue('--radio-tuner-ratio')),
signature: style._radioTunerBandSignature,
signature: style._radioControls._radioTunerBandSignature,
};
}, delta));
}
@@ -3238,9 +3238,9 @@ async function main() {
const gev = window.__godsEyeView;
const style = gev.styleManager;
const before = {
signature: style._radioTunerBandSignature,
ids: style._radioTunerStations.map((station) => station.id),
selectedIndex: style._radioTunerStations.findIndex((station) => station.id === selectedId),
signature: style._radioControls._radioTunerBandSignature,
ids: style._radioControls._radioTunerStations.map((station) => station.id),
selectedIndex: style._radioControls._radioTunerStations.findIndex((station) => station.id === selectedId),
needle: Number(document.getElementById('radio-tuner').style.getPropertyValue('--radio-tuner-ratio')),
};
const current = gev.viewer.camera.positionCartographic;
@@ -3256,11 +3256,11 @@ async function main() {
});
gev.viewer.camera.changed.raiseEvent();
await new Promise((resolve) => setTimeout(resolve, 400));
const stations = gev.styleManager._radioTunerStations;
const stations = gev.styleManager._radioControls._radioTunerStations;
const selectedIndex = stations.findIndex((station) => station.id === selectedId);
return {
before,
signature: style._radioTunerBandSignature,
signature: style._radioControls._radioTunerBandSignature,
ids: stations.map((station) => station.id),
count: stations.length,
selectedIndex,
@@ -3279,14 +3279,14 @@ async function main() {
const nextNeedleBefore = await page.evaluate(() => {
const style = window.__godsEyeView.styleManager;
const selectedId = window.__godsEyeView.dataManager.layers.get('radio').module.getUIState().selected?.id;
const selectedIndex = style._radioTunerStations.findIndex((station) => station.id === selectedId);
const selectedPoolIndex = style._radioTunerPool.findIndex((station) => station.id === selectedId);
const expectedPoolIndex = (selectedPoolIndex + 1) % style._radioTunerPool.length;
const selectedIndex = style._radioControls._radioTunerStations.findIndex((station) => station.id === selectedId);
const selectedPoolIndex = style._radioControls._radioTunerPool.findIndex((station) => station.id === selectedId);
const expectedPoolIndex = (selectedPoolIndex + 1) % style._radioControls._radioTunerPool.length;
return {
signature: style._radioTunerBandSignature,
signature: style._radioControls._radioTunerBandSignature,
selectedIndex,
count: style._radioTunerStations.length,
expectedId: style._radioTunerPool[expectedPoolIndex]?.id || null,
count: style._radioControls._radioTunerStations.length,
expectedId: style._radioControls._radioTunerPool[expectedPoolIndex]?.id || null,
};
});
await page.$eval('#radio-next-btn', (button) => button.click());
@@ -3294,15 +3294,15 @@ async function main() {
const nextNeedleAfter = await page.evaluate(() => {
const style = window.__godsEyeView.styleManager;
const selectedId = window.__godsEyeView.dataManager.layers.get('radio').module.getUIState().selected?.id;
const selectedIndex = style._radioTunerStations.findIndex((station) => station.id === selectedId);
const selectedIndex = style._radioControls._radioTunerStations.findIndex((station) => station.id === selectedId);
return {
signature: style._radioTunerBandSignature,
signature: style._radioControls._radioTunerBandSignature,
selectedId,
selectedIndex,
count: style._radioTunerStations.length,
count: style._radioControls._radioTunerStations.length,
sliderSlot: Number(document.getElementById('radio-tuner-slider').value),
ratio: Number(document.getElementById('radio-tuner').style.getPropertyValue('--radio-tuner-ratio')),
pinned: style._radioTunerBandPinnedForNavigation,
pinned: style._radioControls._radioTunerBandPinnedForNavigation,
};
});
check(
@@ -3327,8 +3327,8 @@ async function main() {
const markerId = () => gev.viewer.entities.values
.find((entity) => String(entity.id).startsWith('radio:selected:'))?.id || null;
const startIndex = Number(slider.value);
const expectedIndex = Math.min(style._radioTunerStations.length - 1, startIndex + 1);
const expectedId = style._radioTunerStations[expectedIndex]?.id || null;
const expectedIndex = Math.min(style._radioControls._radioTunerStations.length - 1, startIndex + 1);
const expectedId = style._radioControls._radioTunerStations[expectedIndex]?.id || null;
const playsBefore = window.__qaRadioPlayCalls.length;
key('keydown', 'ArrowRight');
const preview = {
@@ -3353,7 +3353,7 @@ async function main() {
tuningActive: radio.getUIState().tuningActive,
playDelta: window.__qaRadioPlayCalls.length - committedPlays,
};
const count = style._radioTunerStations.length;
const count = style._radioControls._radioTunerStations.length;
const pageStep = Math.max(1, Math.round((count - 1) / 10));
const previewAndCancel = (value, expectedSlot) => {
const beforePlays = window.__qaRadioPlayCalls.length;
@@ -3405,7 +3405,7 @@ async function main() {
const radio = gev.dataManager.layers.get('radio').module;
const slider = document.getElementById('radio-tuner-slider');
const rect = slider.getBoundingClientRect();
const count = style._radioTunerStations.length;
const count = style._radioControls._radioTunerStations.length;
const centerIndex = Math.floor((count - 1) / 2 + 0.5);
const clientX = rect.left + rect.width / 2;
slider.dispatchEvent(new PointerEvent('pointerdown', {
@@ -3425,7 +3425,7 @@ async function main() {
ratio: Number(document.getElementById('radio-tuner').style.getPropertyValue('--radio-tuner-ratio')),
markerId: gev.viewer.entities.values
.find((entity) => String(entity.id).startsWith('radio:selected:'))?.id || null,
expectedId: style._radioTunerStations[centerIndex]?.id || null,
expectedId: style._radioControls._radioTunerStations[centerIndex]?.id || null,
};
slider.dispatchEvent(new PointerEvent('pointercancel', {
bubbles: true,
@@ -3450,7 +3450,7 @@ async function main() {
const fullPoolNavigation = await page.evaluate(() => {
const gev = window.__godsEyeView;
const radio = gev.dataManager.layers.get('radio').module;
const pool = gev.styleManager._radioTunerPool;
const pool = gev.styleManager._radioControls._radioTunerPool;
const ids = pool.map((station) => station.id);
const selectWithoutPlayback = (index) => radio.selectStation(ids[index], {
autoplay: false,
@@ -3500,7 +3500,7 @@ async function main() {
const gev = window.__godsEyeView;
const slider = document.getElementById('radio-tuner-slider');
const rect = slider.getBoundingClientRect();
const count = gev.styleManager._radioTunerStations.length;
const count = gev.styleManager._radioControls._radioTunerStations.length;
const current = Number(slider.value);
const target = Math.min(count - 1, current + 4);
const xFor = (index) => rect.left + 7 + (rect.width - 14) * index / Math.max(1, count - 1);
@@ -3695,7 +3695,7 @@ async function main() {
Array.from({ length: gev.viewer.dataSources.length }, (_, index) => gev.viewer.dataSources.get(index))
.find((item) => item.name === 'Radio stations').clustering.enabled = true;
radio.selectStation('00000000-0000-4000-8000-000000000001', { autoplay: false, focus: false });
const pool = gev.styleManager._radioTunerPool;
const pool = gev.styleManager._radioControls._radioTunerPool;
const selectedIndex = pool.findIndex((station) => station.id === radio.getUIState().selected?.id);
window.__qaRadioExpectedPrimary = pool[(selectedIndex + 1) % pool.length];
window.__qaRadioExpectedFallback = pool[(selectedIndex + 2) % pool.length];