UNPKG

@visactor/vrender-components

Version:

components library for dp visualization

21 lines (17 loc) 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.commitUpdateAnimationTarget = void 0; const vrender_core_1 = require("@visactor/vrender-core"), vutils_1 = require("@visactor/vutils"); function commitUpdateAnimationTarget(graphic, targetAttrs, startAttrs) { var _a, _b, _c, _d; if (!graphic || !targetAttrs) return; const committedTargetAttrs = (0, vutils_1.cloneDeep)(targetAttrs), transientStartAttrs = (0, vutils_1.cloneDeep)(null != startAttrs ? startAttrs : graphic.attribute); graphic.setAttributes(committedTargetAttrs), null === (_b = (_a = graphic).setFinalAttributes) || void 0 === _b || _b.call(_a, committedTargetAttrs), null === (_d = (_c = graphic).setAttributesAndPreventAnimate) || void 0 === _d || _d.call(_c, transientStartAttrs, !1, { type: vrender_core_1.AttributeUpdateType.ANIMATE_BIND }); } exports.commitUpdateAnimationTarget = commitUpdateAnimationTarget; //# sourceMappingURL=static-truth.js.map