diff --git a/packages/terriajs/CHANGES.md b/packages/terriajs/CHANGES.md index f02551fe1b..52800193f0 100644 --- a/packages/terriajs/CHANGES.md +++ b/packages/terriajs/CHANGES.md @@ -9,6 +9,11 @@ - Document security best practices for production deployment of terriajs - Fix an error when picking features on a Mapbox vector tile layer: `@mapbox/vector-tile` now builds feature props with a null prototype, which broke Cesium's `ImageryLayerFeatureInfo` methods that call `hasOwnProperty` directly. Props are now copied into a plain object before use. - Move catalog index from terria.ts class to catalog instance +- Improved ideal zoom behaviour when zooming to a mappable items rectangle. +- Show spinner when loading tab group members +- Changed `disablePreview` to also hide `Add to map` in preview modal. +- Changed `About data` button to `About job` in workbench for CatalogFunctionJob instances. +- Add `edit` stratum for tracking temporary user changes that shouldn't be captured in share link - example form edits. #### 8.12.5 - 2026-07-28 @@ -16,10 +21,6 @@ - Upgraded `terriajs-cesium` to `26.0.0` and `terriajs-cesium-widgets` to `16.0.0`. We are now using cesium 1.142. - Upgraded terriajs-server to v5.0.0-alpha.3 - Upgraded to i18next v26 and migrated to i18next select pattern `(t($ => translation.key))` #7882 -- Show spinner when loading tab group members -- Changed `disablePreview` to also hide `Add to map` in preview modal. -- Changed `About data` button to `About job` in workbench for CatalogFunctionJob instances. -- Add `edit` stratum for tracking temporary user changes that shouldn't be captured in share link - example form edits. - Upgraded `papaparse` to `5.5.4` (and `@types/papaparse` to `5.5.2`). - Guard CSV exports against spreadsheet formula injection (CWE-1236): the feature-info "Download" CSV, table data export, and `CsvCatalogItem`'s inline `csvString` export now prefix cells a spreadsheet would treat as a formula (`= + - @`, tab, CR) with a `'`, while leaving legitimate numbers (e.g. `-5`) untouched. `TableMixin` table exports now also structurally escape values via `papaparse` (previously they were joined with `,` unescaped). Downloads of a remote `url` are unchanged (the original file is served directly). diff --git a/packages/terriajs/lib/Models/Cesium.ts b/packages/terriajs/lib/Models/Cesium.ts index dac87674a1..ca30978fb8 100644 --- a/packages/terriajs/lib/Models/Cesium.ts +++ b/packages/terriajs/lib/Models/Cesium.ts @@ -945,10 +945,7 @@ export default class Cesium extends GlobeOrMap { } else if (MappableMixin.isMixedInto(target)) { // target is a Mappable if (isDefined(target.cesiumRectangle)) { - return flyToPromise(camera, { - duration: flightDurationSeconds, - destination: target.cesiumRectangle - }); + return this.doZoomTo(target.cesiumRectangle, flightDurationSeconds); } else if (target.mapItems.length > 0) { // Zoom to the first item! return this.doZoomTo(target.mapItems[0], flightDurationSeconds); diff --git a/packages/terriajs/test/Models/TerriaSpec.ts b/packages/terriajs/test/Models/TerriaSpec.ts index 2318d2f036..7067c6df13 100644 --- a/packages/terriajs/test/Models/TerriaSpec.ts +++ b/packages/terriajs/test/Models/TerriaSpec.ts @@ -1327,6 +1327,7 @@ describe("TerriaSpec", function () { await terria.start({ configUrl: "test-config.json" }); await terria.loadInitSources(); await when(() => terria.currentViewer.type === "Cesium"); + await when(() => terria.currentViewer.isMapZooming === false); const cameraPos = terria.cesium?.scene.camera.positionCartographic; expect(cameraPos).toBeDefined(); @@ -1350,6 +1351,7 @@ describe("TerriaSpec", function () { }); // Wait for the switch to happen await when(() => terria.mainViewer.currentViewer.type === "Cesium"); + await when(() => terria.currentViewer.isMapZooming === false); // Ensure that the camera position is correctly updated after the switch const cameraPos = terria.cesium?.scene.camera.positionCartographic; const { longitude, latitude, height } = cameraPos!;