|
@@ -445,3 +445,31 @@ function registerEvent() {
|
|
|
|
|
|
|
|
|
//====设备闪烁提示====
|
|
|
+function flash(objArray) {
|
|
|
+ objArray.forEach(function (obj) {
|
|
|
+ obj.on('update', function () {
|
|
|
+ obj.style.color = '#FFF000'
|
|
|
+ obj.style.opacity = 0.5 + 0.5 * Math.sin(2 * app.elapsedTime / 500);
|
|
|
+ }, '每帧改变透明度');
|
|
|
+ })
|
|
|
+}
|
|
|
+function queryDeviceStatus(evt) {
|
|
|
+ objArray = evt.data;
|
|
|
+ // objArray.forEach(function (deviceobj) {
|
|
|
+ // obj = app.query("#" + deviceobj.ownerCode)[0];
|
|
|
+ // obj.on('update', function () {
|
|
|
+ // obj.style.color = '#FF0000'
|
|
|
+ // obj.style.opacity = 0.5 + 0.5 * Math.sin(2 * app.elapsedTime / 500);
|
|
|
+ // }, '每帧改变透明度');
|
|
|
+
|
|
|
+
|
|
|
+ // })
|
|
|
+ obj = app.query("#" + objArray)[0];
|
|
|
+ obj.on('update', function () {
|
|
|
+ obj.style.color = '#FF0000'
|
|
|
+ obj.style.opacity = 0.5 + 0.5 * Math.sin(2 * app.elapsedTime / 500);
|
|
|
+ }, '每帧改变透明度');
|
|
|
+}
|
|
|
+function reset(objArray) {
|
|
|
+ objArray.forEach(function (obj) {
|
|
|
+ obj.style.opacity = 1.0;
|