This commit is contained in:
Pieter Vander Vennet 2024-01-03 14:17:42 +01:00
parent 70fa180b6a
commit 8b4544db04
3 changed files with 6 additions and 13 deletions

View file

@ -652,12 +652,6 @@ export default class TagRenderingConfig {
multiSelectedMapping: boolean[] | undefined,
currentProperties: Record<string, string>
): UploadableTag {
console.log("Constructing change spec", {
freeformValue,
singleSelectedMapping,
multiSelectedMapping,
currentProperties,
})
if (typeof freeformValue === "string") {
freeformValue = freeformValue?.trim()
}

View file

@ -23,7 +23,7 @@
export let editingEnabled: Store<boolean> | undefined = state?.featureSwitchUserbadge
export let highlightedRendering: UIEventSource<string> = undefined
export let clss
export let clss = undefined
/**
* Indicates if this tagRendering currently shows the attribute or asks the question to _change_ the property
*/

View file

@ -8,15 +8,14 @@
import EditLayerState from "./EditLayerState"
import { onDestroy } from "svelte"
import type { JsonSchemaType } from "./jsonSchema"
import { ConfigMetaUtils } from "./configMeta.ts"
import { ConfigMetaUtils } from "./configMeta"
import ShowConversionMessage from "./ShowConversionMessage.svelte"
export let state: EditLayerState
export let path: (string | number)[] = []
export let schema: ConfigMeta
export let startInEditModeIfUnset: boolean = schema.hints && !schema.hints.ifunset
let value = new UIEventSource<string | any>(undefined)
const isTranslation =
schema.hints?.typehint === "translation" ||
schema.hints?.typehint === "rendered" ||
@ -144,10 +143,10 @@
path,
tags.map((tgs) => {
const v = tgs["value"]
if (typeof v !== "string") {
return { ...v }
if (typeof v === "object") {
return { ...<object>v }
}
if (schema.type === "boolan") {
if (schema.type === "boolean") {
return v === "true" || v === "yes" || v === "1"
}
if (mightBeBoolean(schema.type)) {