forked from MapComplete/MapComplete
Add textmode icons
This commit is contained in:
parent
48953cf266
commit
890e555d87
4 changed files with 23 additions and 17 deletions
|
@ -414,8 +414,8 @@ export default class TagRenderingConfig {
|
|||
return applicableMappings
|
||||
}
|
||||
|
||||
public GetRenderValue(tags: any, defltValue: any = undefined): TypedTranslation<any> {
|
||||
return this.GetRenderValueWithImage(tags, defltValue).then
|
||||
public GetRenderValue(tags: any, defltValue: any = undefined): TypedTranslation<any> | undefined {
|
||||
return this.GetRenderValueWithImage(tags, defltValue)?.then
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -423,7 +423,13 @@ export default class TagRenderingConfig {
|
|||
* Not compatible with multiAnswer - use GetRenderValueS instead in that case
|
||||
* @constructor
|
||||
*/
|
||||
public GetRenderValueWithImage(tags: any, defltValue: any = undefined): { then: TypedTranslation<any>, icon?: string } {
|
||||
public GetRenderValueWithImage(tags: any, defltValue: any = undefined): { then: TypedTranslation<any>, icon?: string } | undefined {
|
||||
if(this.condition !== undefined){
|
||||
if(!this.condition.matchesProperties(tags)){
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mappings !== undefined && !this.multiAnswer) {
|
||||
for (const mapping of this.mappings) {
|
||||
if (mapping.if === undefined) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue