Add more checks in the import helper after user testing

This commit is contained in:
Pieter Vander Vennet 2022-03-24 03:11:29 +01:00
parent 2dac893bb3
commit 9617dbc34d
15 changed files with 344 additions and 94 deletions

View file

@ -42,9 +42,9 @@ class PreviewPanel extends ScrollableFullScreen {
/**
* Shows the data to import on a map, asks for the correct layer to be selected
*/
export class MapPreview extends Combine implements FlowStep<{ bbox: BBox, layer: LayerConfig, geojson: any }> {
export class MapPreview extends Combine implements FlowStep<{ bbox: BBox, layer: LayerConfig, features: any[] }> {
public readonly IsValid: UIEventSource<boolean>;
public readonly Value: UIEventSource<{ bbox: BBox, layer: LayerConfig, geojson: any }>
public readonly Value: UIEventSource<{ bbox: BBox, layer: LayerConfig, features: any[] }>
constructor(
state: UserRelatedState,
@ -153,7 +153,7 @@ export class MapPreview extends Combine implements FlowStep<{ bbox: BBox, layer:
this.Value = bbox.map(bbox =>
({
bbox,
geojson,
features: geojson.features,
layer: layerPicker.GetValue().data
}), [layerPicker.GetValue()])