forked from MapComplete/MapComplete
Chore: improve typing
This commit is contained in:
parent
f82e160ad1
commit
3d442d0558
2 changed files with 6 additions and 6 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { Store, UIEventSource } from "../../Logic/UIEventSource"
|
||||
import { MultiApplyParams } from "./MultiApply"
|
||||
import { SpecialVisualization, SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import { SpecialVisualizationState, SpecialVisualizationSvelte } from "../SpecialVisualization"
|
||||
import SvelteUIElement from "../Base/SvelteUIElement"
|
||||
import MultiApplyButton from "./MultiApplyButton.svelte"
|
||||
|
||||
export class MultiApplyViz extends SpecialVisualization {
|
||||
export class MultiApplyViz extends SpecialVisualizationSvelte {
|
||||
funcName = "multi_apply"
|
||||
needsUrls = []
|
||||
docs =
|
||||
|
|
@ -38,7 +38,7 @@ export class MultiApplyViz extends SpecialVisualization {
|
|||
state: SpecialVisualizationState,
|
||||
tagsSource: UIEventSource<Record<string, string>>,
|
||||
args: string[]
|
||||
) {
|
||||
): SvelteUIElement {
|
||||
const featureIdsKey = args[0]
|
||||
const keysToApply = args[1].split(";")
|
||||
const text = args[2]
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ import ChangeTagAction from "../../Logic/Osm/Actions/ChangeTagAction"
|
|||
import { And } from "../../Logic/Tags/And"
|
||||
import { Tag } from "../../Logic/Tags/Tag"
|
||||
import AllImageProviders from "../../Logic/ImageProviders/AllImageProviders"
|
||||
import { SpecialVisualization, SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import { SpecialVisualizationState, SpecialVisualizationSvelte } from "../SpecialVisualization"
|
||||
import SvelteUIElement from "../Base/SvelteUIElement"
|
||||
import PlantNet from "../PlantNet/PlantNet.svelte"
|
||||
import { default as PlantNetCode } from "../../Logic/Web/PlantNet"
|
||||
import { ServerSourceInfo } from "../../Models/SourceOverview"
|
||||
|
||||
export class PlantNetDetectionViz extends SpecialVisualization {
|
||||
export class PlantNetDetectionViz extends SpecialVisualizationSvelte {
|
||||
funcName = "plantnet_detection"
|
||||
needsUrls: ServerSourceInfo[] = [<ServerSourceInfo>{ url : PlantNetCode.baseUrl,
|
||||
description: "Planet provides an API that, based on images, detects a plant species",
|
||||
|
|
@ -37,7 +37,7 @@ export class PlantNetDetectionViz extends SpecialVisualization {
|
|||
state: SpecialVisualizationState,
|
||||
tags: UIEventSource<Record<string, string>>,
|
||||
args: string[]
|
||||
) {
|
||||
): SvelteUIElement {
|
||||
let imagePrefixes: string[] = undefined
|
||||
if (args.length > 0) {
|
||||
imagePrefixes = [].concat(...args.map((a) => a.split(",")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue