(
animationType: 'enter' | 'update' | 'leave',
el: Element,
elOption: TransitionElementOption,
parentModel: Model<AnimationOptionMixin>,
dataIndex?: number
)
| 103 | }; |
| 104 | |
| 105 | function 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 | |
| 129 | export function applyUpdateTransition( |
no test coverage detected
searching dependent graphs…