Small fixes
This commit is contained in:
parent
fa4fb71e06
commit
ccc1f8eff5
2 changed files with 6 additions and 7 deletions
|
@ -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 "<svg></svg>"
|
||||
}
|
||||
console.log(this._index.data)
|
||||
return Svg.All[`Ornament-Horiz-${Number(this._index.data) - 1}.svg`]
|
||||
return svg;
|
||||
}
|
||||
|
||||
}
|
|
@ -133,8 +133,7 @@
|
|||
"then": "Schwalbe tubes are sold here"
|
||||
}
|
||||
],
|
||||
"multiAnswer": true,
|
||||
"condition": "operator!=Schwalbe"
|
||||
"multiAnswer": true
|
||||
},
|
||||
{
|
||||
"question": "Who maintains this vending machine?",
|
||||
|
|
Loading…
Reference in a new issue