@easyv/charts 1.5.15 → 1.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -412,7 +412,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
412
412
|
bodyHeight = isVertical ? yLineRange : yLineRange + marginTop + marginBottom;
|
|
413
413
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_.ChartContainer, {
|
|
414
414
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
415
|
-
position: "
|
|
415
|
+
position: "absolute"
|
|
416
416
|
}),
|
|
417
417
|
width: width,
|
|
418
418
|
height: height,
|
package/lib/components/Chart.js
CHANGED
|
@@ -116,11 +116,15 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref2) {
|
|
|
116
116
|
};
|
|
117
117
|
}, [id, chartWidth, chartHeight, triggerOnRelative, svg, onEmit]);
|
|
118
118
|
(0, _react.useEffect)(function () {
|
|
119
|
+
var isAnimation = window.screenConfig ? window.screenConfig.isAnimation : true; //大屏的全局设置是否允许开启动画,false为不允许
|
|
120
|
+
|
|
121
|
+
if (!isAnimation) setActive(false);
|
|
122
|
+
|
|
119
123
|
var activeHandler = function activeHandler(e) {
|
|
120
124
|
var _e$dynamicData = e.dynamicData,
|
|
121
125
|
dynamicData = _e$dynamicData === void 0 ? true : _e$dynamicData; // console.log("当前组件(id="+id+")状态:",dynamicData?"唤醒":"休眠");
|
|
122
126
|
|
|
123
|
-
setActive(dynamicData);
|
|
127
|
+
isAnimation && setActive(dynamicData);
|
|
124
128
|
};
|
|
125
129
|
|
|
126
130
|
document.addEventListener("switchActive_".concat(id), activeHandler);
|
package/package.json
CHANGED
package/src/components/Chart.js
CHANGED
|
@@ -92,10 +92,12 @@ const Chart = memo(
|
|
|
92
92
|
);
|
|
93
93
|
|
|
94
94
|
useEffect(()=>{
|
|
95
|
+
let isAnimation = window.screenConfig?window.screenConfig.isAnimation:true; //大屏的全局设置是否允许开启动画,false为不允许
|
|
96
|
+
if(!isAnimation) setActive(false);
|
|
95
97
|
const activeHandler=(e)=>{
|
|
96
98
|
const { dynamicData = true } = e;
|
|
97
99
|
// console.log("当前组件(id="+id+")状态:",dynamicData?"唤醒":"休眠");
|
|
98
|
-
setActive(dynamicData);
|
|
100
|
+
isAnimation && setActive(dynamicData);
|
|
99
101
|
}
|
|
100
102
|
document.addEventListener(`switchActive_${id}`,activeHandler);
|
|
101
103
|
return ()=>{
|