Skip to content

Incorrect documentation for setPosition method in AnimationPlayer interface #57915

@olfek

Description

@olfek

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

animations

Is this a regression?

No

Description

/**
* Sets the position of the animation.
* @param position A 0-based offset into the duration, in milliseconds.
*/
setPosition(position: number): void;

setPosition(position: number): void {
this._position = this.totalTime ? position * this.totalTime : 1;
}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: animationsarea: docsRelated to the documentationstate: has PR

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions