range: add split opt

This commit is contained in:
jean-emmanuel 2017-12-15 09:10:36 +01:00
parent e7c8654eb7
commit 2af36b84e0

View file

@ -42,6 +42,7 @@ module.exports = class Range extends _widgets_base {
precision:2,
address:'auto',
preArgs:[],
split:false,
target:[]
}
@ -57,6 +58,12 @@ module.exports = class Range extends _widgets_base {
super({...options, html: html})
this.split = this.getProp('split')?
typeof this.getProp('split') == 'object' && this.getProp('split').length == 2 ?
this.getProp('split')
: [this.getProp('address') + '/low', this.getProp('address') + '/high']
: false
this.wrapper = this.widget.find('.wrapper')
this.faders = [