Move the click's ground pick into the input dispatcher and weather's default host into its shell rendering

pickGroundPosition reads Cesium's depth and ellipsoid picks, so it moves
unchanged from scenePick into the listed input dispatcher, its only caller.
Weather rendering's default imagery host comes from the listed shell
rendering's globeImageryHost instead of reading the viewer's imagery layers.
This commit is contained in:
Sameh Khamis committed 2026-11-07 18:10:39 -08:00
1 parent 81d8e3a4a7
commit 1f1d08f34e
5 files changed
+40 -38

No files matched your search

+2 -1
View File
@@ -3,6 +3,7 @@ import test from 'node:test';
import * as Cesium from 'cesium';
import { createGroundClick, groundClickHeightOk } from './groundClick.js';
import * as scenePick from '../../data/scenePick.js';
import { pickGroundPosition } from '../../input/dispatcher.js';
import { bindFakeCesiumCamera } from '../../testSupport/fakeCameraPort.mjs';
import { streetPorts } from '../../testSupport/streetLevelFakes.mjs';
@@ -70,7 +71,7 @@ function harness({
const click = (pick) =>
openAtGround({
surface: scenePick.isSurfacePick(pick),
ground: () => scenePick.pickGroundPosition(state.viewer, { x: 1, y: 1 }),
ground: () => pickGroundPosition(state.viewer, { x: 1, y: 1 }),
});
return { opened, click };
}
+2 -1
View File
@@ -1,6 +1,7 @@
import { weatherTileUrl } from './source.js';
import { WEATHER_IMAGERY_Z } from './imageryOrder.js';
import { imageryHostStatus } from './imageryHost.js';
import { globeImageryHost } from './shellRendering.js';
import { drawMosaicTile } from './rasterTiles.js';
import { weatherDisplay } from './display.js';
import { msg } from '../../i18n/index.js';
@@ -600,7 +601,7 @@ export function createWeatherRendering({
frameOf = findFrame,
toBitmap = (canvas) =>
globalThis.createImageBitmap(canvas, { premultiplyAlpha: 'none' }),
getHost = () => ({ collection: viewer.imageryLayers, kind: 'globe' }),
getHost = () => globeImageryHost(viewer),
onChange = () => {},
timeoutMs = 25_000,
now = () => performance.now(),