We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2dac7a commit b30aed5Copy full SHA for b30aed5
src/index.ts
@@ -216,7 +216,11 @@ export class WingInstance extends InstanceBase<WingConfig> implements InstanceBa
216
})
217
218
this.variableHandler.on('update-variable', (variable, value) => {
219
- this.setVariableValues({ [variable]: value })
+ let rounded = Math.round((value + Number.EPSILON) * 10) / 10
220
+ if (Number.isInteger(value)) {
221
+ rounded = Math.round(value)
222
+ }
223
+ this.setVariableValues({ [variable]: rounded })
224
225
226
this.variableHandler.on('send', (cmd: string, arg?: number | string) => {
0 commit comments