From 5ae7d31b048d71a88b9c1ffaa6e01d7bda2794b2 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Mon, 28 Sep 2026 09:55:53 +0000 Subject: [PATCH] useMapFly's zoomToLegendRow comment names readSourceFeatures, not the engine-private _data The comment still said the code reads map.getSource()._data, which invites a copy of the private field back in; the code reads through the shared helper that knows both engines' source shapes. --- library/composables/useMapFly.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/composables/useMapFly.js b/library/composables/useMapFly.js index 94d4dfe96..d75943564 100644 --- a/library/composables/useMapFly.js +++ b/library/composables/useMapFly.js @@ -474,8 +474,9 @@ export function useMapFly(options = {}) { /** * zoomToLegendRow — uniform "click a legend row, fit the scope it represents." * - * Reads the full `language-families` source data via map.getSource()._data - * and evaluates the Mapbox filter expression in JS, bypassing the viewport + * Reads the full `language-families` source data through readSourceFeatures() + * (library/maps/pin-selection.js, which knows both engines' source shapes; never + * the engine-private `_data` directly) and evaluates the filter expression in JS, bypassing the viewport * clip that previously caused off-screen regions to silently no-op. fitBounds * is bidirectional — it zooms OUT to a wider region just as readily as it * zooms IN to a tight cluster, so Africa-row and North-India-cluster-row