Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Animations: let 'Play' button support different durations for different frames #5362

Open
Labels
P3backlog communitycommunity contribution featuresomething new
@sducouedic

Description

So far the button Play only support a single frame duration and a single transition duration for all the steps of the animation. It would be very useful to support different duration values at different frame step. Note that I haven't any way to define specific duration per frame, I am open to suggestions.

Current:

fig.update_layout(
 updatemenus=[{
 'type': 'buttons',
 'buttons': [
 {
 'label': 'Play',
 'method': 'animate',
 'args': [None, {
 'fromcurrent': True,
 'frame': {'duration': 100, 'redraw': False},
 'transition': {'duration': 100}
 }]
 }
 ]
 }]
)

Possible alternative way to pass information:

fig.update_layout(
 updatemenus=[{
 'type': 'buttons',
 'buttons': [
 {
 'label': 'Play',
 'method': 'animate',
 'args': [None, {
 'fromcurrent': True,
 'frame': [(str(i), {'duration': 100 if i%2 == 0 else 1000, 'redraw': False}) for i in range(len(frames))],
 'transition': [(str(i), {'duration': 100 if i%2 == 0 else 1000}) for i in range(len(frames))]
 }]
 }
 ]
 }]
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlog communitycommunity contribution featuresomething new

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /