diff --git a/UI/Popup/TagRenderingQuestion.ts b/UI/Popup/TagRenderingQuestion.ts index 36f152f4a..f38712323 100644 --- a/UI/Popup/TagRenderingQuestion.ts +++ b/UI/Popup/TagRenderingQuestion.ts @@ -113,7 +113,6 @@ export default class TagRenderingQuestion extends UIElement { } private GenerateMultiAnswer(elements: InputElement[], freeformField: InputElement): InputElement { - const possibleTags = elements.map(el => el.GetValue().data); const checkBoxes = new CheckBoxes(elements); const inputEl = new InputElementMap( checkBoxes, @@ -125,8 +124,7 @@ export default class TagRenderingQuestion extends UIElement { return undefined; } const tags: TagsFilter[] = indices.map(i => elements[i].GetValue().data); - const multi = TagUtils.FlattenMultiAnswer(tags); - return multi; + return TagUtils.FlattenMultiAnswer(tags); }, (tags: TagsFilter) => { // {key --> values[]} diff --git a/UI/SpecialVisualizations.ts b/UI/SpecialVisualizations.ts index 2da5fbb2e..b40b02400 100644 --- a/UI/SpecialVisualizations.ts +++ b/UI/SpecialVisualizations.ts @@ -29,7 +29,12 @@ export class SubstitutedTranslation extends UIElement { this.translation = translation; this.tags = tags; const self = this; - Locale.language.addCallbackAndRun(() => { + tags.addCallbackAndRun(() => { + self.content = self.CreateContent(); + self.Update(); + }); + + Locale.language.addCallback(() => { self.content = self.CreateContent(); self.Update(); }); diff --git a/package.json b/package.json index 0bf725a05..deaf15a4e 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "prepare-deploy": "npm run generate:editor-layer-index && npm run generate:layouts && npm run generate && npm run build && rm -rf .cache", "deploy:staging": "npm run prepare-deploy && rm -rf /home/pietervdvn/git/pietervdvn.github.io/MapComplete/* && cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/MapComplete/ && cd /home/pietervdvn/git/pietervdvn.github.io/ && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", "deploy:production": "rm -rf ./assets/generated && npm run prepare-deploy && npm run optimize-images && rm -rf /home/pietervdvn/git/mapcomplete.github.io/* && cp -r dist/* /home/pietervdvn/git/mapcomplete.github.io/ && cd /home/pietervdvn/git/mapcomplete.github.io/ && echo \"mapcomplete.osm.be\" > CNAME && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", - "clean": "rm -rf .cache/ && (find *.html | grep -v \"\\(index\\|land\\|test\\|preferences\\|customGenerator\\).html\" | xargs rm) && (find *.webmanifest | xargs rm)" + "clean": "rm -rf .cache/ && (find *.html | grep -v \"\\(index\\|land\\|test\\|preferences\\|customGenerator\\).html\" | xargs rm) && rm *.webmanifest" }, "keywords": [ "OpenStreetMap",