Refactoring the import button

This commit is contained in:
Pieter Vander Vennet 2021-12-09 13:16:40 +01:00
parent f29c62ab19
commit 6e84dfcab0
11 changed files with 352 additions and 208 deletions

View file

@ -38,10 +38,11 @@ import Toggle from "./Input/Toggle";
import {DefaultGuiState} from "./DefaultGuiState";
import {GeoOperations} from "../Logic/GeoOperations";
import Hash from "../Logic/Web/Hash";
import FeaturePipelineState from "../Logic/State/FeaturePipelineState";
export interface SpecialVisualization {
funcName: string,
constr: ((state: State, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState,) => BaseUIElement),
constr: ((state: FeaturePipelineState, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState,) => BaseUIElement),
docs: string,
example?: string,
args: { name: string, defaultValue?: string, doc: string }[],
@ -641,6 +642,7 @@ export default class SpecialVisualizations {
}
]
static generateTagsToApply(spec: string, tagSource: UIEventSource<any>): UIEventSource<Tag[]> {
const tgsSpec = spec.split(";").map(spec => {