forked from MapComplete/MapComplete
Refactoring: put all special visualisations into their own class, add their location into the documentation
This commit is contained in:
parent
c0e7c9e8fa
commit
ae5205f92d
29 changed files with 2270 additions and 2075 deletions
|
|
@ -14,11 +14,12 @@ import ThemeConfig from "../../../Models/ThemeConfig/ThemeConfig"
|
|||
import { Changes } from "../../../Logic/Osm/Changes"
|
||||
import { IndexedFeatureSource } from "../../../Logic/FeatureSource/FeatureSource"
|
||||
import FullNodeDatabaseSource from "../../../Logic/FeatureSource/TiledFeatureSource/FullNodeDatabaseSource"
|
||||
import { OsmTags } from "../../../Models/OsmFeature"
|
||||
|
||||
/**
|
||||
* Wrapper around 'WayImportFlow' to make it a special visualisation
|
||||
*/
|
||||
export default class WayImportButtonViz implements AutoAction, SpecialVisualization {
|
||||
export default class WayImportButtonViz extends SpecialVisualization implements AutoAction {
|
||||
public readonly funcName: string = "import_way_button"
|
||||
needsUrls = []
|
||||
group = "data_import"
|
||||
|
|
@ -62,7 +63,7 @@ export default class WayImportButtonViz implements AutoAction, SpecialVisualizat
|
|||
|
||||
constr(
|
||||
state: SpecialVisualizationState,
|
||||
tagSource: UIEventSource<Record<string, string>>,
|
||||
tagSource: UIEventSource<OsmTags>,
|
||||
argument: string[],
|
||||
feature: Feature,
|
||||
_: LayerConfig
|
||||
|
|
@ -125,7 +126,5 @@ export default class WayImportButtonViz implements AutoAction, SpecialVisualizat
|
|||
await state.changes.applyAction(action)
|
||||
}
|
||||
|
||||
getLayerDependencies(args: string[]) {
|
||||
return ImportFlowUtils.getLayerDependenciesWithSnapOnto(this.args, args)
|
||||
}
|
||||
getLayerDependencies = (args: string[]) => ImportFlowUtils.getLayerDependenciesWithSnapOnto(this.args, args)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue