diff --git a/UI/Base/Ornament.ts b/UI/Base/Ornament.ts index 2cbf759..3de8733 100644 --- a/UI/Base/Ornament.ts +++ b/UI/Base/Ornament.ts @@ -16,10 +16,10 @@ export default class Ornament extends UIElement { const self = this; this.onClick(() => { let c = Number(index.data); - if(isNaN(c)){ + if (isNaN(c)) { c = 0; } - self._index.setData(""+ ((c + 1) % (Ornament.ornamentsCount + 1))); + self._index.setData("" + ((c + 1) % (Ornament.ornamentsCount + 1))); }) } @@ -35,11 +35,11 @@ export default class Ornament extends UIElement { } InnerRender(): string { - if(this._index.data == "0"){ + const svg = Svg.All[`Ornament-Horiz-${Number(this._index.data) - 1}.svg`]; + if (this._index.data == "0" || svg === undefined) { return "" } - console.log(this._index.data) - return Svg.All[`Ornament-Horiz-${Number(this._index.data) - 1}.svg`] + return svg; } } \ No newline at end of file diff --git a/assets/layers/bicycle_tube_vending_machine/bicycle_tube_vending_machine.json b/assets/layers/bicycle_tube_vending_machine/bicycle_tube_vending_machine.json index 3b0b816..53018e3 100644 --- a/assets/layers/bicycle_tube_vending_machine/bicycle_tube_vending_machine.json +++ b/assets/layers/bicycle_tube_vending_machine/bicycle_tube_vending_machine.json @@ -133,8 +133,7 @@ "then": "Schwalbe tubes are sold here" } ], - "multiAnswer": true, - "condition": "operator!=Schwalbe" + "multiAnswer": true }, { "question": "Who maintains this vending machine?", diff --git a/package.json b/package.json index 5a0b035..946d9e5 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "generate": "npm run generate:images && npm run generate:translations", "build": "rm -rf dist/ && npm run generate && parcel build --public-url ./ *.html assets/** assets/**/** assets/**/**/** vendor/* vendor/*/*", "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:staging": "npm run prepare-deploy && rm -rf /home/pietervdvn/git/pietervdvn.github.io/Staging/* && cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/Staging/ && 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) && rm *.webmanifest" }, diff --git a/scripts/createLayouts.ts b/scripts/createLayouts.ts index 1b84b98..7c32c6f 100644 --- a/scripts/createLayouts.ts +++ b/scripts/createLayouts.ts @@ -127,7 +127,7 @@ function createIcon(iconPath: string, size: number, layout: LayoutConfig) { /* // We already read to file, in order to crash here if the file is not found readFileSync(iconPath); - svg2img(iconPath, + /* svg2img(iconPath, // @ts-ignore {width: size, height: size, preserveAspectRatio: true}) .then((buffer) => {