mirror of
https://github.com/0x1d/esp8266-laser.git
synced 2025-12-14 18:15:22 +01:00
return value as default
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user