• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IgniteUI / igniteui-angular / 13331632524

14 Feb 2025 02:51PM CUT coverage: 22.015% (-69.6%) from 91.622%
13331632524

Pull #15372

github

web-flow
Merge d52d57714 into bcb78ae0a
Pull Request #15372: chore(*): test ci passing

1990 of 15592 branches covered (12.76%)

431 of 964 new or added lines in 18 files covered. (44.71%)

19956 existing lines in 307 files now uncovered.

6452 of 29307 relevant lines covered (22.02%)

249.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.44
/projects/igniteui-angular/src/lib/services/animation/angular-animation-player.ts
1
import { AnimationPlayer as AngularAnimationPlayer } from '@angular/animations';
2
import { EventEmitter } from '@angular/core';
3
import { IBaseEventArgs } from '../../core/utils';
4
import { AnimationPlayer } from './animation';
5

6
export class IgxAngularAnimationPlayer implements AnimationPlayer {
7
    private _innerPlayer: AngularAnimationPlayer;
8
    public animationStart: EventEmitter<IBaseEventArgs> = new EventEmitter<IBaseEventArgs>();
156✔
9
    public animationEnd: EventEmitter<IBaseEventArgs> = new EventEmitter<IBaseEventArgs>();
156✔
10

11
    public get position(): number {
12
        return this._innerPlayer.getPosition();
40✔
13
    }
14

15
    public set position(value: number) {
16
        this.internalPlayer.setPosition(value);
40✔
17
    }
18

19
    constructor(private internalPlayer: AngularAnimationPlayer) {
156✔
20
        this.internalPlayer.onDone(() => this.onDone());
177✔
21
        const innerRenderer = (this.internalPlayer as any)._renderer;
156✔
22
        //  We need inner player as Angular.AnimationPlayer.getPosition returns always 0.
23
        // To workaround this we are getting the positions from the inner player.
24
        //  This is logged in Angular here - https://github.com/angular/angular/issues/18891
25
        //  As soon as this is resolved we can remove this hack
26
        const rendererEngine = innerRenderer.engine || innerRenderer.delegate.engine;
156!
27
        // A workaround because of Angular SSR is using some delegation.
28
        this._innerPlayer = rendererEngine.players[rendererEngine.players.length - 1];
156✔
29
    }
30

31
    public init(): void {
32
        this.internalPlayer.init();
40✔
33
    }
34

35
    public play(): void {
36
        this.animationStart.emit({ owner: this });
135✔
37
        this.internalPlayer.play();
135✔
38
    }
39

40
    public finish(): void {
UNCOV
41
        this.internalPlayer.finish();
×
42
        // TODO: when animation finish angular deletes all onDone handlers. Add handlers again if needed
43
    }
44

45
    public reset(): void {
46
        this.internalPlayer.reset();
215✔
47
        // calling reset does not change hasStarted to false. This is why we are doing it here via internal field
48
        (this.internalPlayer as any)._started = false;
215✔
49
    }
50

51
    public destroy(): void {
52
        this.internalPlayer.destroy();
156✔
53
    }
54

55
    public hasStarted(): boolean {
56
        return this.internalPlayer.hasStarted();
760✔
57
    }
58

59
    private onDone(): void {
60
        this.animationEnd.emit({ owner: this });
177✔
61
    }
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc