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, multiSelectedMapping: boolean[] | undefined,
currentProperties: Record<string, string> currentProperties: Record<string, string>
): UploadableTag { ): UploadableTag {
console.log("Constructing change spec", {
freeformValue,
singleSelectedMapping,
multiSelectedMapping,
currentProperties,
})
if (typeof freeformValue === "string") { if (typeof freeformValue === "string") {
freeformValue = freeformValue?.trim() freeformValue = freeformValue?.trim()
} }

View file

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