range: fix spring not taking range min/max into account

This commit is contained in:
jean-emmanuel 2018-02-07 13:21:52 +01:00
parent c6207cacd2
commit 85a381ec3e

View file

@ -245,7 +245,7 @@ module.exports = class Range extends Widget {
horizontal:this.getProp('horizontal'),
height:'100%',
width:'100%',
value:this.getProp('value').length==2?this.getProp('value')[0]:'',
value:this.getProp('value').length==2?this.getProp('value')[0]:this.getProp('range').min,
snap:this.getProp('snap'),
spring:this.getProp('spring'),
range:this.getProp('range'),
@ -262,7 +262,7 @@ module.exports = class Range extends Widget {
horizontal:this.getProp('horizontal'),
height:'100%',
width:'100%',
value:this.getProp('value').length==2?this.getProp('value')[1]:'',
value:this.getProp('value').length==2?this.getProp('value')[1]:this.getProp('range').max,
snap:this.getProp('snap'),
spring:this.getProp('spring'),
range:this.getProp('range'),