MCPcopy
hub / github.com/apache/echarts / getElementAnimationConfig

Function getElementAnimationConfig

src/animation/customGraphicTransition.ts:105–126  ·  view source on GitHub ↗
(
    animationType: 'enter' | 'update' | 'leave',
    el: Element,
    elOption: TransitionElementOption,
    parentModel: Model<AnimationOptionMixin>,
    dataIndex?: number
)

Source from the content-addressed store, hash-verified

103};
104
105function getElementAnimationConfig(
106 animationType: 'enter' | 'update' | 'leave',
107 el: Element,
108 elOption: TransitionElementOption,
109 parentModel: Model<AnimationOptionMixin>,
110 dataIndex?: number
111) {
112 const animationProp = `${animationType}Animation` as const;
113 const config: ElementAnimateConfig = getAnimationConfig(animationType, parentModel, dataIndex) || {};
114
115 const userDuring = transitionInnerStore(el).userDuring;
116 // Only set when duration is > 0 and it's need to be animated.
117 if (config.duration > 0) {
118 // For simplicity, if during not specified, the previous during will not work any more.
119 config.during = userDuring ? bind(duringCall, { el: el, userDuring: userDuring }) : null;
120 config.setToFinal = true;
121 config.scope = animationType;
122 }
123
124 extend(config, elOption[animationProp]);
125 return config;
126}
127
128
129export function applyUpdateTransition(

Callers 3

applyUpdateTransitionFunction · 0.85
applyLeaveTransitionFunction · 0.85
applyPropsTransitionFunction · 0.85

Calls 2

getAnimationConfigFunction · 0.90
extendFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…