sliders: use cached wrapper element

This commit is contained in:
jean-emmanuel 2017-06-13 22:32:46 +02:00
parent fc7f94c1ea
commit 0e88fdd3c2
2 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@ module.exports = class Encoder extends _widgets_base {
`
super({...options, html: html})
this.wrapper = this.widget.find('.wrapper')
this.wrapper = this.wrapper
this.ticks = Math.abs(parseInt(this.getProp('ticks')))
this.knob = new EncoderKnob({props:{

View file

@ -80,7 +80,7 @@ module.exports = class Fader extends _sliders_base {
this.widget.addClass('has-pips')
var pips = $('<div class="pips"></div>').appendTo(this.widget.find('.wrapper'))
var pips = $('<div class="pips"></div>').appendTo(this.wrapper)
var pipTexts = {}
for (var k in this.rangeKeys) {
pipTexts[this.rangeKeys[k]]=this.rangeLabels[k]
@ -117,7 +117,7 @@ module.exports = class Fader extends _sliders_base {
color:this.getProp('color'),
pips:this.getProp('pips')
}
var element = parsewidgets([data],this.widget.find('.wrapper'), this.parent)
var element = parsewidgets([data],this.wrapper, this.parent)
element[0].classList.add('not-editable')
this.widget[0].classList.add('has-meter')
}