forked from MapComplete/MapComplete
refactoring: fix special renderings (partly), deprecate
This commit is contained in:
parent
9b2f92dedc
commit
aaaaf1948d
15 changed files with 160 additions and 95 deletions
|
@ -363,6 +363,7 @@ ${Utils.special_visualizations_importRequirementDocs}
|
|||
}
|
||||
|
||||
export class ConflateButton extends AbstractImportButton {
|
||||
needsNodeDatabase = true
|
||||
constructor() {
|
||||
super(
|
||||
"conflate_button",
|
||||
|
@ -442,6 +443,8 @@ export class ConflateButton extends AbstractImportButton {
|
|||
export class ImportWayButton extends AbstractImportButton implements AutoAction {
|
||||
public readonly supportsAutoAction = true
|
||||
|
||||
needsNodeDatabase = true
|
||||
|
||||
constructor() {
|
||||
super(
|
||||
"import_way_button",
|
||||
|
|
|
@ -51,13 +51,23 @@ export interface SpecialVisualizationState {
|
|||
}
|
||||
|
||||
export interface SpecialVisualization {
|
||||
funcName: string
|
||||
docs: string | BaseUIElement
|
||||
example?: string
|
||||
readonly funcName: string
|
||||
readonly docs: string | BaseUIElement
|
||||
readonly example?: string
|
||||
|
||||
/**
|
||||
* Indicates that this special visualsiation will make requests to the 'alLNodesDatabase' and that it thus should be included
|
||||
*/
|
||||
readonly needsNodeDatabase?: boolean
|
||||
readonly args: {
|
||||
name: string
|
||||
defaultValue?: string
|
||||
doc: string
|
||||
required?: false | boolean
|
||||
}[]
|
||||
readonly getLayerDependencies?: (argument: string[]) => string[]
|
||||
|
||||
structuredExamples?(): { feature: Feature<Geometry, Record<string, string>>; args: string[] }[]
|
||||
args: { name: string; defaultValue?: string; doc: string; required?: false | boolean }[]
|
||||
getLayerDependencies?: (argument: string[]) => string[]
|
||||
|
||||
constr(
|
||||
state: SpecialVisualizationState,
|
||||
|
|
|
@ -55,7 +55,6 @@ import FeatureReviews from "../Logic/Web/MangroveReviews"
|
|||
import Maproulette from "../Logic/Maproulette"
|
||||
import SvelteUIElement from "./Base/SvelteUIElement"
|
||||
import { BBoxFeatureSourceForLayer } from "../Logic/FeatureSource/Sources/TouchesBboxFeatureSource"
|
||||
import { Feature } from "geojson"
|
||||
|
||||
export default class SpecialVisualizations {
|
||||
public static specialVisualizations: SpecialVisualization[] = SpecialVisualizations.initList()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue