UNPKG

@visactor/vrender-components

Version:

components library for dp visualization

14 lines (12 loc) 776 B
import { AttributeUpdateType } from "@visactor/vrender-core"; import { cloneDeep } from "@visactor/vutils"; export function commitUpdateAnimationTarget(graphic, targetAttrs, startAttrs) { var _a, _b, _c, _d; if (!graphic || !targetAttrs) return; const committedTargetAttrs = cloneDeep(targetAttrs), transientStartAttrs = 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: AttributeUpdateType.ANIMATE_BIND }); } //# sourceMappingURL=static-truth.js.map