( event: AnimationEvent | TransitionEvent, nativeElement: HTMLElement, )
| 325 | * @returns |
| 326 | */ |
| 327 | export function isLongestAnimation( |
| 328 | event: AnimationEvent | TransitionEvent, |
| 329 | nativeElement: HTMLElement, |
| 330 | ): boolean { |
| 331 | const longestAnimation = longestAnimations.get(nativeElement); |
| 332 | // If we don't have any record of a longest animation, then we shouldn't |
| 333 | // block the animationend/transitionend event from doing its work. |
| 334 | if (longestAnimation === undefined) return true; |
| 335 | return ( |
| 336 | nativeElement === getEventTarget(event) && |
| 337 | ((longestAnimation.animationName !== undefined && |
| 338 | (event as AnimationEvent).animationName === longestAnimation.animationName) || |
| 339 | (longestAnimation.propertyName !== undefined && |
| 340 | (longestAnimation.propertyName === 'all' || |
| 341 | (event as TransitionEvent).propertyName === longestAnimation.propertyName))) |
| 342 | ); |
| 343 | } |
| 344 | |
| 345 | /** |
| 346 | * Stores a given animation function in the LView's animation map for later execution |
no test coverage detected
searching dependent graphs…