osc: implementing /GET (issue #56)
This commit is contained in:
parent
93fa6b2f72
commit
cd05e21d47
1 changed files with 32 additions and 0 deletions
|
|
@ -44,7 +44,39 @@ var callbacks = {
|
|||
updateDom(container,data,true)
|
||||
}
|
||||
},
|
||||
|
||||
'/GET':function(args) {
|
||||
|
||||
var [target, idOrAddress, ...preArgs] = args,
|
||||
widgets = []
|
||||
|
||||
if (idOrAddress[0] == '/') {
|
||||
|
||||
widgets = widgetManager.getWidgetByAddress(
|
||||
widgetManager.createAddressRef(null, preArgs, idOrAddress)
|
||||
)
|
||||
|
||||
} else {
|
||||
|
||||
widgets = widgetManager.getWidgetById(idOrAddress)
|
||||
|
||||
}
|
||||
|
||||
if (!widgets.length) return
|
||||
|
||||
for (var i = widgets.length - 1; i >= 0; i--) {
|
||||
|
||||
if (typeof target == 'string' && target.indexOf(':') != -1) {
|
||||
widgets[i].sendValue({target:[target]})
|
||||
} else {
|
||||
widgets[i].sendValue()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
'/TABS': function(args) {
|
||||
// DEPRECATED
|
||||
|
||||
if (!Array.isArray(args)) args = [args]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue