switch: avoid stringish numbers in oscsend
This commit is contained in:
parent
775aacefa8
commit
4736f1fcdb
1 changed files with 4 additions and 3 deletions
|
|
@ -323,12 +323,13 @@ createWidget.switch = function(widgetData) {
|
|||
return widget.value
|
||||
}
|
||||
widget.setValue = function(v,send,sync) {
|
||||
var e = widget.find('.value[data-value="'+v+'"]')
|
||||
var e = widget.find('.value[data-value="'+v+'"]'),
|
||||
i = e.index()
|
||||
if (e.length) {
|
||||
widget.value = v
|
||||
widget.value = widgetData.values[i]
|
||||
widget.find('.on').removeClass('on')
|
||||
e.addClass('on').ripple()
|
||||
if (send) widget.sendValue(v)
|
||||
if (send) widget.sendValue(widget.value)
|
||||
if (sync) widget.trigger('sync')
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue