-
Notifications
You must be signed in to change notification settings - Fork 7
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
Auto-animation API #40
Conversation
Nice API! |
Thanks, the names of the templates are up for grab though. |
I do not mind showOn, you could also have a showFrom (or showSince) and showUntil (where you give the last index. Or a difference set could be showBefore, showAfter, showAt |
Those are good names, thanks 😁 There are a lot of small details like this to consider. Should it be zero indexed (like Nim) or 1 index (like the rows in animateCode)? Should we use inclusive or exclusive variants of the templates? I think inclusive, 1-indexed makes the most sense in this case. What is your take on this? |
This is really sweet actually, the example above became the more readable: autoAnimateSlides(5):
showUntil(3):
nbText: "1, 2, 3"
nbText: "Always"
showFrom(3):
nbText: "3, 4, 5" |
yep, inclusive and 1-indexed looks a good choice to me. |
I've finally written the the docs. I will proably have another go at supporting other blocks in the future but this is good enough for now. |
Closes #38
The proposed API is:
You pass the total number of slides you want to auto-animate to
autoAnimateSlides
and then eachshowOn
will only be shown on the slides it number. In this case the firstnbText
will be shown for the first three slides and the last one will be shown only on the last three slides. And it all auto-animates!Still left todo:
nbText
APInbCode
API