doubleTap: make it optionnal for pads/sliders
This commit is contained in:
parent
9abd6c7678
commit
5a90643dc8
8 changed files with 49 additions and 18 deletions
|
|
@ -28,6 +28,7 @@ module.exports = class Xy extends _pads_base {
|
|||
|
||||
snap:false,
|
||||
spring:false,
|
||||
doubleTap:false,
|
||||
|
||||
_osc:'osc',
|
||||
|
||||
|
|
@ -129,9 +130,11 @@ module.exports = class Xy extends _pads_base {
|
|||
})
|
||||
}
|
||||
|
||||
doubletabreset(this.wrapper, ()=>{
|
||||
this.setValue([this.faders.x.springValue,this.faders.y.springValue],{sync:true, send:true, fromLocal:true})
|
||||
})
|
||||
if (this.getProp('doubleTap')) {
|
||||
doubletabreset(this.wrapper, ()=>{
|
||||
this.setValue([this.faders.x.springValue,this.faders.y.springValue],{sync:true, send:true, fromLocal:true})
|
||||
})
|
||||
}
|
||||
|
||||
this.faders.x.input.change(()=>{
|
||||
var v = [this.faders.x.value, this.faders.y.value]
|
||||
|
|
|
|||
|
|
@ -52,9 +52,13 @@ module.exports = class _sliders_base extends _canvas_base {
|
|||
|
||||
this.springValue = this.getProp('value') !== '' ? this.getProp('value') : this.originValue
|
||||
|
||||
doubletabreset(this.widget, ()=>{
|
||||
this.setValue(this.springValue,{sync:true, send:true, fromLocal:true})
|
||||
})
|
||||
if (this.getProp('doubleTap')) {
|
||||
|
||||
doubletabreset(this.widget, ()=>{
|
||||
this.setValue(this.springValue,{sync:true, send:true, fromLocal:true})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
this.widget.on('fake-right-click',function(e){
|
||||
if (!EDITING) {
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ module.exports = class Encoder extends _widgets_base {
|
|||
_behaviour:'behaviour',
|
||||
|
||||
snap:false,
|
||||
doubleTap:false,
|
||||
|
||||
_osc:'osc',
|
||||
|
||||
|
|
@ -151,13 +152,17 @@ module.exports = class Encoder extends _widgets_base {
|
|||
})
|
||||
})
|
||||
|
||||
doubletabreset(this.wrapper, ()=>{
|
||||
this.knob.setValue(this.ticks/2)
|
||||
this.display.setValue(this.ticks/2)
|
||||
if (this.getProp('release') !== '' && this.value !== this.getProp('release')) {
|
||||
this.setValue(this.getProp('release'), {sync:true, send:true, dragged:false})
|
||||
}
|
||||
})
|
||||
if (this.getProp('doubleTap')) {
|
||||
|
||||
doubletabreset(this.wrapper, ()=>{
|
||||
this.knob.setValue(this.ticks/2)
|
||||
this.display.setValue(this.ticks/2)
|
||||
if (this.getProp('release') !== '' && this.value !== this.getProp('release')) {
|
||||
this.setValue(this.getProp('release'), {sync:true, send:true, dragged:false})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
this.wrapper.on('mousewheel', (e)=>{
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ module.exports = class Fader extends _sliders_base {
|
|||
|
||||
snap:false,
|
||||
spring:false,
|
||||
doubleTap:false,
|
||||
|
||||
_osc:'osc',
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ module.exports = class Knob extends _sliders_base {
|
|||
|
||||
snap:false,
|
||||
spring:false,
|
||||
doubleTap:false,
|
||||
|
||||
_osc:'osc',
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue