slider: fix value update draw for inverted ranges
This commit is contained in:
parent
3355093375
commit
aee15544e7
2 changed files with 5 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
- bug fixes
|
||||
- `@{parent}` calls not working consistently in clone widgets
|
||||
- `slider/pads`: inteverted ranges not working
|
||||
- editor
|
||||
- removed widget deletion confirmation popup
|
||||
- properties categories can now be folded
|
||||
|
|
|
|||
|
|
@ -190,7 +190,10 @@ class Slider extends Canvas {
|
|||
valueToPercent(value) {
|
||||
|
||||
for (var i=0;i<this.rangeVals.length-1;i++) {
|
||||
if (value <= this.rangeVals[i+1] && value >= this.rangeVals[i]) {
|
||||
if (
|
||||
(this.rangeVals[i+1] > this.rangeVals[i] && value <= this.rangeVals[i+1] && value >= this.rangeVals[i]) ||
|
||||
(this.rangeVals[i+1] < this.rangeVals[i] && value >= this.rangeVals[i+1] && value <= this.rangeVals[i])
|
||||
) {
|
||||
return mapToScale(value,[this.rangeVals[i],this.rangeVals[i+1]],[this.rangeKeys[i],this.rangeKeys[i+1]],false,this.getProp('logScale'),true)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue