Browse Source

修复 禁用动画失效问题

master
谕仙 2 years ago
parent
commit
55ef0b7ebb
  1. 5
      lpro/src/main/webapp/page/visual/js/cfg.js

5
lpro/src/main/webapp/page/visual/js/cfg.js

@ -344,6 +344,7 @@ var cfg = {
// 增加切换复原属性 边框和形状 // 增加切换复原属性 边框和形状
app.columnVal = obj.attr("border") ; app.columnVal = obj.attr("border") ;
app.shape = obj.attr("shape") ; app.shape = obj.attr("shape") ;
app.isDisableAnimation = obj.attr("enableAnimation")==="true"?false:true;
break ; break ;
case '8': case '8':
case '9': case '9':
@ -843,6 +844,7 @@ function initSensorLiquidChart(){
current_edit_obj.attr("enableAnimation",true); current_edit_obj.attr("enableAnimation",true);
current_edit_obj.attr("shape","container"); current_edit_obj.attr("shape","container");
current_edit_obj.attr("border",0); current_edit_obj.attr("border",0);
current_edit_obj.attr("max",max);
var bai = 0.5; var bai = 0.5;
var siz = 20; var siz = 20;
option = { option = {
@ -923,11 +925,14 @@ function ableLiquidFillAnimation(nodeId,chart){
}] }]
}); });
},2000) },2000)
current_edit_obj.attr('enableAnimation',true);
intervalIdBynodeId.set(nodeId,intervalId); intervalIdBynodeId.set(nodeId,intervalId);
} }
// 禁止水变化 // 禁止水变化
function disableLiquidFillAnimation(nodeId){ function disableLiquidFillAnimation(nodeId){
let intervalId=intervalIdBynodeId.get(nodeId); let intervalId=intervalIdBynodeId.get(nodeId);
var current_edit_obj = cfg.current_edit_obj;
current_edit_obj.attr('enableAnimation',false);
clearInterval(intervalId); clearInterval(intervalId);
} }
// 更新Charts属性 // 更新Charts属性

Loading…
Cancel
Save