UNPKG

@visactor/vrender-components

Version:

components library for dp visualization

29 lines (25 loc) 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.AnimateComponent = void 0; const base_1 = require("../core/base"), vutils_1 = require("@visactor/vutils"); class AnimateComponent extends base_1.AbstractComponent { _prepareAnimate(defaultAnimation) { if (!1 !== this.attribute.animation) { const {animation: animation, animationEnter: animationEnter, animationExit: animationExit, animationUpdate: animationUpdate} = this.attribute, animationCfg = (0, vutils_1.isObject)(animation) ? animation : {}; this._animationConfig = { enter: !1 !== animationEnter && (0, vutils_1.merge)({}, defaultAnimation, animationCfg, null != animationEnter ? animationEnter : {}), exit: !1 !== animationExit && (0, vutils_1.merge)({}, defaultAnimation, animationCfg, null != animationExit ? animationExit : {}), update: !1 !== animationUpdate && ((0, vutils_1.isArray)(animationUpdate) ? animationUpdate : (0, vutils_1.merge)({}, defaultAnimation, animationCfg, null != animationUpdate ? animationUpdate : {})) }; } else this._animationConfig = { enter: !1, exit: !1, update: !1 }; } } exports.AnimateComponent = AnimateComponent; //# sourceMappingURL=animate-component.js.map