Rework units to allow picking different default units in different locations, fixes #1011

This commit is contained in:
Pieter Vander Vennet 2022-08-18 19:17:15 +02:00
parent e981abd2aa
commit 5da76b9418
17 changed files with 149 additions and 100 deletions

View file

@ -617,6 +617,7 @@ export default class TagRenderingQuestion extends Combine {
const tagsData = tags.data;
const feature = state?.allElements?.ContainingFeatures?.get(tagsData.id)
const center = feature != undefined ? GeoOperations.centerpointCoordinates(feature) : [0, 0]
console.log("Creating a tr-question with applicableUnit", applicableUnit)
const input: InputElement<string> = ValidatedTextField.ForType(configuration.freeform.type)?.ConstructInputElement({
country: () => tagsData._country,
location: [center[1], center[0]],