Fix: fix download panel

This commit is contained in:
Pieter Vander Vennet 2024-10-01 23:46:04 +02:00
parent a70e2272f7
commit fb3bf98f19
2 changed files with 7 additions and 2 deletions

View file

@ -155,6 +155,10 @@ export default class ThemeViewState implements SpecialVisualizationState {
public readonly geocodedImages: UIEventSource<Feature[]> = new UIEventSource<Feature[]>([])
public readonly searchState: SearchState
/**
* Used to check in the download panel if used
*/
public readonly featureSummary: SummaryTileSourceRewriter
constructor(layout: LayoutConfig, mvtAvailableLayers: Set<string>) {
Utils.initDomPurify()
@ -356,6 +360,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
bounds: this.visualFeedbackViewportBounds,
},
)
this.featureSummary = this.setupSummaryLayer()
this.hasDataInView = new NoElementsInViewDetector(this).hasFeatureInView
this.imageUploadManager = new ImageUploadManager(
layout,
@ -785,7 +790,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
),
current_view: this.currentView,
favourite: this.favourites,
summary: this.setupSummaryLayer(),
summary: this.featureSummary,
last_click: this.lastClickObject,
search: this.searchState.locationResults,
}

View file

@ -22,7 +22,7 @@
let metaIsIncluded = false
let numberOfFeatures = state.featureSummary.totalNumberOfFeatures
let numberOfFeatures = state.featureSummary?.totalNumberOfFeatures
async function getGeojson() {
await state.indexedFeatures.downloadAll()