Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function pathOut(shape, animateCfg) {
if (shape.get('type') !== 'path') {
return;
}
const path = pathUtil.path2Curve(shape.attr('path'));
const endState = {
path: [path[0]],
};
animateCfg.callback = () => shape.remove();
doAnimation(shape, endState, animateCfg);
}
function pathIn(shape, animateCfg) {
if (shape.get('type') !== 'path') {
return;
}
const path = pathUtil.path2Curve(shape.attr('path'));
shape.attr('path', [path[0]]);
const endState = {
path,
};
doAnimation(shape, endState, animateCfg);
}