Country Posters: Export poster opens its dialog again, and two legend calls that did nothing are gone (the legend's rows are called items)
This commit is contained in:
parent
a035408e26
commit
401b5d28d0
1 changed files with 3 additions and 7 deletions
|
|
@ -792,7 +792,7 @@ const legend = useLegendData({
|
|||
dataStore,
|
||||
legendType: activeLegendType
|
||||
})
|
||||
provide('legendRows', legend.rows)
|
||||
provide('legendRows', legend.items) // useLegendData returns `items` (there is no `rows`)
|
||||
// SemanticTreeLegend (and LegendFamilyTree.legacy) need raw normalized
|
||||
// people-groups, not pre-aggregated legendRows. mapData owns the normalized
|
||||
// array; expose to descendants.
|
||||
|
|
@ -1530,8 +1530,6 @@ function switchTab(tabId) {
|
|||
map.value.moveLayer('language-family-pins')
|
||||
}
|
||||
}
|
||||
// Re-aggregate legend rows for the new lens
|
||||
legend.refresh?.()
|
||||
// Re-color clusters (cluster paint depends on active strategy)
|
||||
clustering.refreshColors?.()
|
||||
}
|
||||
|
|
@ -2085,8 +2083,6 @@ async function onMapReady(normalizedPeopleGroups) {
|
|||
if (activeTab.value?.id === 'prayer') mapLayers.startPrayerGlow()
|
||||
// Hand the same dataset to clustering so MST/network can rebuild on toggle
|
||||
clustering.setData?.(normalizedPeopleGroups)
|
||||
// Build the initial legend
|
||||
legend.build?.(normalizedPeopleGroups)
|
||||
// Selected-pin highlight + GO marker — must come after the language-families
|
||||
// source exists (added by addLanguageFamilyLayer above).
|
||||
selectedPin.initialize()
|
||||
|
|
@ -2390,12 +2386,12 @@ onBeforeUnmount(() => {
|
|||
<!-- PosterDialog's contract is v-model (visibility) + a getMap ACCESSOR. This passed :poster /
|
||||
:active-tab (props it does not declare) and neither of those, so its own v-if="visible"
|
||||
stayed false: "Export poster…" opened nothing, on both engines, since the dialog moved to
|
||||
the library. legend.rows is a ref inside a plain object, so the template must unwrap it. -->
|
||||
the library. legend.items is a ref inside a plain object, so the template must unwrap it (useLegendData has no `rows`: reading it threw and the dialog never opened, NE-17). -->
|
||||
<PosterDialog
|
||||
v-if="showPoster"
|
||||
v-model="showPoster"
|
||||
:get-map="() => map"
|
||||
:legend-rows="legend.rows.value || []"
|
||||
:legend-rows="legend.items.value || []"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue