forked from MapComplete/MapComplete
Refactoring: remove more remnants of the old UIElement based framework
This commit is contained in:
parent
cab3492742
commit
38460609ae
2 changed files with 3 additions and 33 deletions
|
|
@ -1,21 +0,0 @@
|
|||
import { Store } from "../../Logic/UIEventSource"
|
||||
import BaseUIElement from "../BaseUIElement"
|
||||
import { VariableUiElement } from "../Base/VariableUIElement"
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* The 'Toggle' is a UIElement showing either one of two elements, depending on the state.
|
||||
* It can be used to implement e.g. checkboxes or collapsible elements
|
||||
*/
|
||||
export default class Toggle extends VariableUiElement {
|
||||
public readonly isEnabled: Store<boolean>
|
||||
|
||||
constructor(
|
||||
showEnabled: string | BaseUIElement,
|
||||
showDisabled: string | BaseUIElement,
|
||||
isEnabled: Store<boolean>
|
||||
) {
|
||||
super(isEnabled?.map((isEnabled) => (isEnabled ? showEnabled : showDisabled)))
|
||||
this.isEnabled = isEnabled
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
import {
|
||||
SpecialVisualization,
|
||||
SpecialVisualizationState,
|
||||
SpecialVisualizationSvelte,
|
||||
} from "../SpecialVisualization"
|
||||
import { SpecialVisualization, SpecialVisualizationState, SpecialVisualizationSvelte } from "../SpecialVisualization"
|
||||
import Maproulette from "../../Logic/Maproulette"
|
||||
import SvelteUIElement from "../Base/SvelteUIElement"
|
||||
import { PointImportButtonViz } from "../Popup/ImportButtons/PointImportButtonViz"
|
||||
|
|
@ -15,7 +11,6 @@ import { Feature, GeoJsonProperties } from "geojson"
|
|||
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
||||
import BaseUIElement from "../BaseUIElement"
|
||||
import LinkedDataLoader from "../../Logic/Web/LinkedDataLoader"
|
||||
import Toggle from "../Input/Toggle"
|
||||
import ComparisonTool from "../Comparison/ComparisonTool.svelte"
|
||||
import { Utils } from "../../Utils"
|
||||
import TagApplyViz from "./TagApplyViz"
|
||||
|
|
@ -220,8 +215,7 @@ class LinkedDataFromWebsite extends SpecialVisualization {
|
|||
console.log("linked_data_from_website received the following data:", lod)
|
||||
)
|
||||
|
||||
return new Toggle(
|
||||
new SvelteUIElement(ComparisonTool, {
|
||||
return new SvelteUIElement(ComparisonTool, {
|
||||
feature,
|
||||
state,
|
||||
tags,
|
||||
|
|
@ -230,10 +224,7 @@ class LinkedDataFromWebsite extends SpecialVisualization {
|
|||
sourceUrl,
|
||||
readonly,
|
||||
collapsed: isClosed,
|
||||
}),
|
||||
undefined,
|
||||
sourceUrl.map((url) => !!url)
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue