NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/@antv/g2/esm/animate/animation/wave-in.js
2023-09-14 14:47:11 +08:00

26 lines
1.0 KiB
Java
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { __assign } from "tslib";
import { getCoordinateClipCfg } from '../../util/coordinate';
/**
* @ignore
* 整体动画
* 划入入场动画效果
* @todo 放两张直角坐标系和极坐标系的图
* @param element 参与动画的图形元素
* @param animateCfg 动画配置
* @param cfg 额外信息
*/
export function waveIn(element, animateCfg, cfg) {
var _a = getCoordinateClipCfg(cfg.coordinate, 20), type = _a.type, startState = _a.startState, endState = _a.endState; // 根据坐标系类型获取整体的剪切区域配置信息
var clipShape = element.setClip({
type: type,
attrs: startState,
}); // 为 shape 设置剪切区域
// 对剪切图形做动画
clipShape.animate(endState, __assign(__assign({}, animateCfg), { callback: function () {
if (element && !element.get('destroyed')) {
element.set('clipShape', null);
}
clipShape.remove(true); // 动画结束需要将剪切图形销毁
} }));
}
//# sourceMappingURL=wave-in.js.map