(
el: Element,
elOption: TransitionElementOption,
animatableModel: Model<AnimationOptionMixin>,
onRemove?: () => void
)
| 226 | } |
| 227 | |
| 228 | export function applyLeaveTransition( |
| 229 | el: Element, |
| 230 | elOption: TransitionElementOption, |
| 231 | animatableModel: Model<AnimationOptionMixin>, |
| 232 | onRemove?: () => void |
| 233 | ): void { |
| 234 | if (el) { |
| 235 | const parent = el.parent; |
| 236 | const leaveToProps = transitionInnerStore(el).leaveToProps; |
| 237 | if (leaveToProps) { |
| 238 | // TODO TODO use leave after leaveAnimation in series is introduced |
| 239 | // TODO Data index? |
| 240 | const config = getElementAnimationConfig('update', el, elOption, animatableModel, 0); |
| 241 | config.done = () => { |
| 242 | parent && parent.remove(el); |
| 243 | onRemove && onRemove(); |
| 244 | }; |
| 245 | el.animateTo(leaveToProps, config); |
| 246 | } |
| 247 | else { |
| 248 | parent && parent.remove(el); |
| 249 | onRemove && onRemove(); |
| 250 | } |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | export function isTransitionAll(transition: TransitionProps): transition is 'all' { |
| 255 | return transition === 'all'; |
no test coverage detected
searching dependent graphs…