xy: handle faders' event from wrapper

This commit is contained in:
jean-emmanuel 2016-10-20 13:25:45 +02:00
parent c652065bd8
commit 2103dc32b3

View file

@ -84,9 +84,7 @@ var Xy = module.exports.Xy = function(widgetData) {
this.wrapper.append(this.faders.x.widget)
this.wrapper.append(this.faders.y.widget)
this.widget.on('sync',(e)=>{
if (e.xyIgnore) return
this.wrapper.on('sync',(e)=>{
e.stopPropagation()
@ -96,7 +94,7 @@ var Xy = module.exports.Xy = function(widgetData) {
if (this.value[id] != v) {
this.value[id] = v
if (options.send) this.sendValue()
if (options.sync) this.widget.trigger({type:'sync',xyIgnore:true, id:this.widgetData.id,widget:this.widget, linkId:this.widgetData.linkId, options:options})
if (options.sync) this.widget.trigger({type:'sync', id:this.widgetData.id,widget:this.widget, linkId:this.widgetData.linkId, options:options})
}
})