forked from MapComplete/MapComplete
Refactoring: switch specialVis constructor to an object
This commit is contained in:
parent
6bb33771b4
commit
1bd226a6fa
38 changed files with 369 additions and 563 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Store, UIEventSource } from "../../Logic/UIEventSource"
|
||||
import { SpecialVisualization, SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import { SpecialVisualisationParams, SpecialVisualization, SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import { Feature } from "geojson"
|
||||
import SvelteUIElement from "../Base/SvelteUIElement"
|
||||
import Histogram from "../BigComponents/Histogram.svelte"
|
||||
|
|
@ -36,12 +36,8 @@ export class HistogramViz extends SpecialVisualization {
|
|||
]
|
||||
}
|
||||
|
||||
constr(
|
||||
state: SpecialVisualizationState,
|
||||
tagSource: UIEventSource<Record<string, string>>,
|
||||
args: string[]
|
||||
) {
|
||||
const values: Store<string[]> = tagSource.map((tags) => {
|
||||
constr( {tags, args}: SpecialVisualisationParams): SvelteUIElement {
|
||||
const values: Store<string[]> = tags.map((tags) => {
|
||||
const value = tags[args[0]]
|
||||
try {
|
||||
if (value === "" || value === undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue