multixy: traversing: mak all points follow the gesture, and make multipoint work

This commit is contained in:
jean-emmanuel 2017-01-11 12:20:02 +01:00
parent 381c4d39b1
commit 6439ceef35

View file

@ -95,16 +95,9 @@ module.exports = class MultiXy extends _pads_base {
this.value = []
this.handles.forEach((handle, index)=>{
let active = false
handle.on('draginit',(e, data, traversing)=>{
if (traversing && active) {
handle.triggerHandler('drag',[data, traversing])
return
}
active = true
if (!traversing) {
handle.addClass('active')
}
@ -139,7 +132,6 @@ module.exports = class MultiXy extends _pads_base {
if (this.pads[id]) this.pads[id].wrapper.trigger(e.type, [data, traversing])
handle.removeClass('active')
this.handlesToPads[index] = false
active = false
})