forked from MapComplete/MapComplete
Refactoring: remove selectedLayer where unneeded
This commit is contained in:
parent
3e0a42ef46
commit
5d09b31c50
8 changed files with 14 additions and 77 deletions
|
|
@ -14,11 +14,6 @@ export interface ShowDataLayerOptions {
|
|||
*/
|
||||
selectedElement?: UIEventSource<Feature>
|
||||
|
||||
/**
|
||||
* When a feature of this layer is tapped, the layer will be marked
|
||||
*/
|
||||
selectedLayer?: UIEventSource<LayerConfig>
|
||||
|
||||
/**
|
||||
* If set, zoom to the features when initially loaded and when they are changed
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ export default class ConflateImportFlowState extends ImportFlow<ConflateFlowArgu
|
|||
const action = this.action
|
||||
await this.state.changes.applyAction(action)
|
||||
const newId = action.newElementId ?? action.mainObjectId
|
||||
this.state.selectedLayer.setData(this.targetLayer.layerDef)
|
||||
this.state.selectedElement.setData(this.state.indexedFeatures.featuresById.data.get(newId))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ export default class WayImportFlowState extends ImportFlow<WayImportFlowArgument
|
|||
const action = this.action
|
||||
await this.state.changes.applyAction(action)
|
||||
const newId = action.newElementId ?? action.mainObjectId
|
||||
this.state.selectedLayer.setData(this.targetLayer.layerDef)
|
||||
this.state.selectedElement.setData(this.state.indexedFeatures.featuresById.data.get(newId))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,14 +55,6 @@ export interface SpecialVisualizationState {
|
|||
readonly mapProperties: MapProperties & ExportableMap
|
||||
|
||||
readonly selectedElement: UIEventSource<Feature>
|
||||
/**
|
||||
* Works together with 'selectedElement' to indicate what properties should be displayed
|
||||
* @deprecated
|
||||
*
|
||||
* No need to set this anymore
|
||||
*/
|
||||
readonly selectedLayer: UIEventSource<LayerConfig>
|
||||
readonly selectedElementAndLayer: Store<{ feature: Feature; layer: LayerConfig }>
|
||||
|
||||
readonly favourites: FavouritesFeatureSource
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue