-
Notifications
You must be signed in to change notification settings - Fork 254
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
Not clear on how to use data-steps
attribute on a slide
#160
Comments
Yeah unfortunately this was primarily intended for slide effects that can be coded with CSS attribute selectors. Ideally Inspire.js should also fire events for this (e.g. |
Whoops! I found the |
The irony: I needed this myself just now, and had to look up your post to remember how to do it 🤣 And I coded the thing! |
Just pushed an experimental change for an |
well would you look at that, something else I said I was gonna do and didn't get around to. Thanks Lea |
Background: I want to add a WebGL canvas to one of my slides, and cue different phases of an animation when I use the arrow keys to proceed to the next slide. Clearly it's not desirable to use separate slides for this, but to do something similar to what
delayed-children
does.Looking over the source I've found a
data-steps
attribute that I can use to assign a number of steps to a slide, but I'm not sure how its supposed to be used. I see that it must be set to an integer, and doing so creates a number of<span>
elements that progressively havedisplayed
added to their class, but I don't understand what these elements are supposed to do, and there doesn't seem to be anything demonstrating the feature in the example slide deck.Furthermore, I was hoping to hook into the
slidechange
event to trigger different phases of the animation, but this only fires for a complete slide change, not for progressive changes on a slide withdelayed-children
ordata-steps
.I suppose I could use DOM Mutation Observers to watch these changes to these dummy elements, but this seems unwieldy as I'd need to find the child index of each to know which one was just
displayed
.At this point I thought I'd ask the community what I might be missing about
data-steps
, and if there's an opportunity for a feature to fire an event as each of these steps are progressed through, which I'd be happy to submit a PR for. Thoughts?The text was updated successfully, but these errors were encountered: