sliders: steps option not working when range.min is not 0
This commit is contained in:
parent
e15f138bd6
commit
829cbe6064
2 changed files with 6 additions and 1 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 0.39.5
|
||||
|
||||
- bug fixes
|
||||
- sliders: `steps` option not working when `range.min` is not `0`
|
||||
|
||||
## 0.39.4
|
||||
|
||||
- widgets
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ class Slider extends Canvas {
|
|||
var steps = this.getProp('steps')
|
||||
this.steps = Array.isArray(steps) ?
|
||||
steps : typeof steps === 'number' ?
|
||||
Array(steps).fill(0).map((x, i) => i / (steps - 1) * this.rangeValsMax + this.rangeValsMin)
|
||||
Array(steps).fill(0).map((x, i) => i / (steps - 1) * (this.rangeValsMax - this.rangeValsMin) + this.rangeValsMin)
|
||||
: this.rangeVals
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue