| | |
| | | var deviceStates; |
| | | var monitorPointStates; |
| | | moralMap.refreshState = function (states) { |
| | | if (!monitorPointStates) { |
| | | monitorPointStates = states; |
| | | deviceStates = []; |
| | | for (var i in states) { |
| | | var state = states[i]; |
| | | for (var j in state.devices) { |
| | | var device = state.devices[j]; |
| | | deviceStates.push(device); |
| | | } |
| | | monitorPointStates = states; |
| | | deviceStates = []; |
| | | for (var i in states) { |
| | | var state = states[i]; |
| | | for (var j in state.devices) { |
| | | var device = state.devices[j]; |
| | | deviceStates.push(device); |
| | | } |
| | | } |
| | | listView.refreshState(deviceStates); |