( event: AnimationEvent | TransitionEvent, nativeElement: HTMLElement, renderer: Renderer, )
| 189 | } |
| 190 | |
| 191 | function enterAnimationEnd( |
| 192 | event: AnimationEvent | TransitionEvent, |
| 193 | nativeElement: HTMLElement, |
| 194 | renderer: Renderer, |
| 195 | ) { |
| 196 | const elementData = enterClassMap.get(nativeElement); |
| 197 | // this event.target check is to prevent issues with bubbling events that are from child element animations |
| 198 | if (getEventTarget(event) !== nativeElement || !elementData) return; |
| 199 | if (isLongestAnimation(event, nativeElement)) { |
| 200 | // Now that we've found the longest animation, there's no need |
| 201 | // to keep bubbling up this event as it's not going to apply to |
| 202 | // other elements further up. We don't want it to inadvertently |
| 203 | // affect any other animations on the page. |
| 204 | event.stopPropagation(); |
| 205 | removeClasses(renderer, nativeElement, elementData.classList); |
| 206 | cleanupEnterClassData(nativeElement); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | /** |
| 211 | * Instruction to handle the `(animate.enter)` behavior for event bindings, aka when |
no test coverage detected