state saving/loading data pattern fixed

This commit is contained in:
jean-emmanuel 2015-09-20 14:10:52 +02:00 • committed by bordun
parent aee9669130
commit 0b549e3c42
3 changed files with 341 additions and 342 deletions

View file

@ -29,11 +29,11 @@ sendState = function(){
setState = function(preset){
$.each(preset.split('\n'),function(i,d) {
var data = d.split(':')
var data = d.split(' ')
setTimeout(function(){
if (__widgets__[data[1]]!=undefined) {
__widgets__[data[1]][0].setValue(data[2].split(','),true,true)
if (__widgets__[data[0]]!=undefined) {
__widgets__[data[0]][0].setValue(data[1].split(','),true,true)
}
},i)
})