Skip to content

Commit

Permalink
sliders: steps error (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-emmanuel committed Nov 23, 2023
1 parent a6237a0 commit e4db027
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog

## 1.26.0
## 1.25.6

- bug fixes
- sliders: error when `steps` is an array

- scripting
- `stateSet`: add optional `{send: false}` flag
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "open-stage-control",
"productName": "Open Stage Control",
"description": "Libre and modular OSC / MIDI controller",
"version": "1.25.5",
"version": "1.25.6",
"author": {
"name": "Jean-Emmanuel Doucet",
"email": "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion src/client/widgets/sliders/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class Slider extends Canvas {
} else if (typeof steps === 'number' && Math.round(steps) > 0) {
steps = Math.round(steps)
this.steps = Array(steps).fill(0).map((x, i) => i / (steps - 1) * (this.rangeValsMax - this.rangeValsMin) + this.rangeValsMin)
} else if (Array.isArray(steps) && step.every(x=>typeof x === 'number')) {
} else if (Array.isArray(steps) && steps.every(x=>typeof x === 'number')) {
this.steps = steps
} else {
this.steps = null
Expand Down

0 comments on commit e4db027

Please sign in to comment.