Skip to content

Commit

Permalink
fix(options): fix decimal bug
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed May 6, 2018
1 parent a221bc7 commit 835e1ca
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/options/OptDictPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ export default {
}
},
handleRatioChange (target, min, max, value) {
return this.handleNumChange(
target,
min / 100,
max / 100,
Number(value) / 100,
)
value = Number(value)
// trigger update
this[target] = value / 100
if (value < min) {
this[target] = min / 100
} else if (value > max) {
this[target] = max / 100
}
}
},
}
Expand Down

0 comments on commit 835e1ca

Please sign in to comment.