Add send email icon, add default icons series

This commit is contained in:
Pieter Vander Vennet 2020-11-24 12:52:01 +01:00
parent 488fd16873
commit dc5cd08a3a
8 changed files with 126 additions and 21 deletions

View file

@ -100,8 +100,20 @@ export default class LayerConfig {
}
this.tagRenderings = trs(json.tagRenderings).concat(roamingRenderings);
this.titleIcons = trs(json.titleIcons ?? ["phonelink","wikipedialink","osmlink", "sharelink"]);
const titleIcons = [];
const defaultIcons = ["phonelink", "emaillink", "wikipedialink", "osmlink", "sharelink"];
for (const icon of (json.titleIcons ?? defaultIcons)) {
if (icon === "defaults") {
titleIcons.push(...defaultIcons);
} else {
titleIcons.push(icon);
}
}
this.titleIcons = trs(titleIcons);
function tr(key, deflt) {
const v = json[key];