- multifader made compatible with plot

- debug line removed
This commit is contained in:
jean-emmanuel 2016-03-14 20:07:18 +01:00
parent 2262bda873
commit c7ed97e282
5 changed files with 65 additions and 3 deletions

View file

@ -76,7 +76,6 @@ var editObject = function(container, data, refresh){
} catch(err) {
v = $(this).val()
}
console.log(v)
data[$(this).attr('title')] = v
if (v=='') delete data[$(this).attr('title')]

View file

@ -36,6 +36,8 @@ module.exports.create = function(widgetData,container) {
`),
$document = $(document)
widget.value = []
for (var i=0;i<widgetData.strips;i++) {
var data = {
type:'fader',
@ -54,9 +56,23 @@ module.exports.create = function(widgetData,container) {
element[0].classList.add('not-editable')
element.find('.fader-wrapper').off('drag')
widget.value[i] = widgetData.range.min
}
widget.on('sync',function(e,id,w){
if (id==widgetData.id) return
widget.value[w.parent().index()] = w.getValue()
widget.trigger('sync',[widgetData.id,widget])
})
widget.getValue = function(){
return widget.value
}
widget.delegateDrag()
return widget