return value as default

This commit is contained in:
2017-10-23 22:59:52 +02:00
parent 997d4742d1
commit b8aef19542
3 changed files with 12 additions and 8 deletions

View File

@@ -105,7 +105,12 @@ var $ = function(selector){
};
Sui.select(actuator.selector).forEach( (domEl) =>{
let handle = function(event) {
update.call(this, actuator.api, 'GET', actuator.data ? actuator.data.call(this) : undefined );
update.call(this,
actuator.api,
'GET',
actuator.data ?
actuator.data.call(this) : [this.value]
);
}
$(domEl).on(actuator.event, handle)
});
@@ -173,9 +178,6 @@ var $ = function(selector){
method: 'GET',
selector: '.laser.slider',
event: 'change',
data: function(){
return [this.value];
},
onResponse: debugResponse
}].forEach(Sui.link({
api: {