Skip to content

[ENH]: Start Animation in a paused state #31883

@dbs4261

Description

@dbs4261

Problem

Currently when creating an animation, the event source is started by a callback that runs Animation._start() during the first 'draw_event'. This prevents any attempt of starting an animation in a paused state short of tampering with private parts of the API. Additionally, the user should be able to query the state of the event source. The EventSourceProtocol has no method that returns if it has been started or stopped.

Proposed solution

Instead the constructor could specify with a keyword argument if the animation should start in a paused state or not. That boolean could then be used to guard the call to event_source.start() which could be called later in a callback provided by the user. Additionally a method that returns a boolean should be added to all event sources and the EventSourceProtcol that returns if it is stopped or started.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions