forked from MapComplete/MapComplete
I should have commited sooner...
This commit is contained in:
parent
2685b6e734
commit
16612b10ef
35 changed files with 570 additions and 177 deletions
|
@ -28,7 +28,8 @@ export class FeatureInfoBox extends UIElement {
|
|||
this._layerConfig = layerConfig;
|
||||
|
||||
|
||||
this._title = new TagRenderingAnswer(tags, layerConfig.title)
|
||||
this._title = layerConfig.title === undefined ? undefined :
|
||||
new TagRenderingAnswer(tags, layerConfig.title)
|
||||
.SetClass("featureinfobox-title");
|
||||
this._titleIcons = new Combine(
|
||||
layerConfig.titleIcons.map(icon => new TagRenderingAnswer(tags, icon)))
|
||||
|
|
|
@ -15,6 +15,9 @@ export default class TagRenderingAnswer extends UIElement {
|
|||
super(tags);
|
||||
this._tags = tags;
|
||||
this._configuration = configuration;
|
||||
if(configuration === undefined){
|
||||
throw "Trying to generate a tagRenderingAnswer without configuration..."
|
||||
}
|
||||
}
|
||||
|
||||
InnerRender(): string {
|
||||
|
|
|
@ -251,7 +251,8 @@ export default class TagRenderingQuestion extends UIElement {
|
|||
|
||||
const textField = ValidatedTextField.InputForType(this._configuration.freeform.type, {
|
||||
isValid: (str) => (str.length <= 255),
|
||||
country: this._tags.data._country
|
||||
country: this._tags.data._country,
|
||||
location: [this._tags.data._lat, this._tags.data._lon]
|
||||
});
|
||||
|
||||
textField.GetValue().setData(this._tags.data[this._configuration.freeform.key]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue