Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sequence function to support chaining together multiple animations #3

Closed
notoriousb1t opened this issue Feb 22, 2016 · 3 comments
Closed
Assignees

Comments

@notoriousb1t
Copy link
Member

Add the ability to chain animations together in sequence.

Just.sequence(function(builder) {
    return builder
        .fadeIn(el)
        .wait(3000)
        .fadeOut(el)
        .fadeIn(el2)
        .wait(1000)
        .fadeOut(el2);
});
Just.sequence(builder => builder
        .fadeIn(el)
        .wait(3000)
        .fadeOut(el)
        .fadeIn(el2)
        .wait(1000)
        .fadeOut(el2));
@notoriousb1t
Copy link
Member Author

Another possibility:

Just.sequence([
     {
          animation: 'fadeIn',
          element: el
     },
     {
          wait: 3000
     },
     {
          animation: 'fadeOut',
          element: el
     }
])

@notoriousb1t
Copy link
Member Author

This is partially implemented. No wait command, but sequences can be played, reversed, paused, canceled, etc.

@notoriousb1t notoriousb1t self-assigned this Mar 4, 2016
@notoriousb1t
Copy link
Member Author

Changing options structure to support options and name to be more descriptive

Just.animateSequence({
  steps: [
    {
      animation: 'fadeIn',
      element: el
    },
    {
      wait: 3000
    },
    {
      animation: 'fadeOut',
      element: el
    }
  ],
  autoplay: false
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant