angular icon indicating copy to clipboard operation
angular copied to clipboard

Incorrect documentation for `setPosition` method in `AnimationPlayer` interface

Open olfek opened this issue 1 year ago • 2 comments

Which @angular/* package(s) are the source of the bug?

animations

Is this a regression?

No

Description

https://github.com/angular/angular/blob/950a5540f15118e7360506ad82ec9dab5a11f789/packages/animations/src/players/animation_player.ts#L76-L80

https://github.com/angular/angular/blob/950a5540f15118e7360506ad82ec9dab5a11f789/packages/animations/src/players/animation_player.ts#L197-L199

As you can see, position: number is used as a 0-1 fractional value.

But the comment says:

A 0-based offset into the duration, in milliseconds.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No response

olfek avatar Sep 22 '24 19:09 olfek

Being able to set the this._position unit (millisecond position) would be better, so maybe the documentation is correct, and it is actually the code that is incorrect?

olfek avatar Sep 22 '24 21:09 olfek

I need to work on it. thanks

muhammadawaisshaikh avatar Sep 23 '24 11:09 muhammadawaisshaikh

this is done already, please close this @olfek

PR Closed: https://github.com/angular/angular/pull/57927

muhammadawaisshaikh avatar Dec 21 '24 13:12 muhammadawaisshaikh

closing. fixed by - https://github.com/angular/angular/commit/2f5f898d21c91679dc22a67c6d25f873217adff5

olfek avatar Dec 21 '24 13:12 olfek

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.