forked from MapComplete/MapComplete
Fix: cleanup various typing mistakes, remove unused variables, add error handling in opening hours related special visualisations
This commit is contained in:
parent
35cd979b5e
commit
091b7fbba5
16 changed files with 103 additions and 58 deletions
|
@ -1,8 +1,4 @@
|
|||
import {
|
||||
SpecialVisualization,
|
||||
SpecialVisualizationState,
|
||||
SpecialVisualizationSvelte,
|
||||
} from "../SpecialVisualization"
|
||||
import { SpecialVisualization, SpecialVisualizationState, SpecialVisualizationSvelte } from "../SpecialVisualization"
|
||||
import Constants from "../../Models/Constants"
|
||||
import { UIEventSource } from "../../Logic/UIEventSource"
|
||||
import { Feature } from "geojson"
|
||||
|
@ -13,7 +9,6 @@ import { Utils } from "../../Utils"
|
|||
import CloseNoteButton from "../Popup/Notes/CloseNoteButton.svelte"
|
||||
import Translations from "../i18n/Translations"
|
||||
import AddNoteComment from "../Popup/Notes/AddNoteComment.svelte"
|
||||
import { Imgur } from "../../Logic/ImageProviders/Imgur"
|
||||
import UploadImage from "../Image/UploadImage.svelte"
|
||||
import { VariableUiElement } from "../Base/VariableUIElement"
|
||||
import Combine from "../Base/Combine"
|
||||
|
@ -81,7 +76,7 @@ class CloseNoteViz extends SpecialVisualizationSvelte {
|
|||
|
||||
class AddNoteCommentViz extends SpecialVisualizationSvelte {
|
||||
funcName = "add_note_comment"
|
||||
needsUrls = [Constants.osmAuthConfig.url]
|
||||
needsUrls = [Constants.osmAuthConfig]
|
||||
docs = "A textfield to add a comment to a node (with the option to close the note)."
|
||||
args = [
|
||||
{
|
||||
|
@ -104,7 +99,7 @@ class OpenNote extends SpecialVisualizationSvelte {
|
|||
funcName = "open_note"
|
||||
args = []
|
||||
group = "notes"
|
||||
needsUrls = [Constants.osmAuthConfig.url]
|
||||
needsUrls = [Constants.osmAuthConfig]
|
||||
docs = "Creates a new map note on the given location. This options is placed in the 'last_click'-popup automatically if the 'notes'-layer is enabled"
|
||||
|
||||
constr(
|
||||
|
@ -157,7 +152,7 @@ class VisualiseNoteComment extends SpecialVisualization {
|
|||
defaultValue: "0",
|
||||
},
|
||||
]
|
||||
needsUrls = [Constants.osmAuthConfig.url]
|
||||
needsUrls = [Constants.osmAuthConfig]
|
||||
|
||||
constr(state, tags, args) {
|
||||
return new VariableUiElement(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue