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

Event "stepleave", How can I get the ID of the next step before arriving there? #375

Closed
edu791 opened this issue Mar 25, 2014 · 6 comments
Closed

Comments

@edu791
Copy link

edu791 commented Mar 25, 2014

I'm writing a plugin for assigning a document.body backgroun color for every slide.
When I use the event impress:stepleave, I need to know the ID of the next step where is moving in the moment, because I need to start a CSS-transform with transition for changing the background color according to the target step color.

@bartaz
Copy link
Member

bartaz commented Mar 25, 2014

At the moment events don't have any additional impress-specific data, so you only know the step that is a target of the event (so the step you are leaving).

But I think you may be able to achieve your per-slide background using CSS only.

Every step has an ID and there is a class being set on <body> element when presentation moves to given step.

Let's assume you have a step with ID first and second. When you are on the first slide <body> will have class impress-on-first, when you leave this step immediately body gets the class impress-on-second. So I think you can add your per-slide backgrounds (with transitions) based on these classes on <body> element.

@edu791
Copy link
Author

edu791 commented Mar 26, 2014

Thank you! @bartaz , I didn't know that.

@edu791
Copy link
Author

edu791 commented Mar 26, 2014

I think I will publish an Impress.js plugin to set a body background-color for each step slide with CSS Transition based ot its data-attributes.

@FagnerMartinsBrack
Copy link
Member

Refer to #206 for an implementation example.

@FagnerMartinsBrack
Copy link
Member

FagnerMartinsBrack commented Apr 3, 2016

Hi @eduardrock, in an effort to clear up older issues/PRs we are pinging back to know if you are still tracking this request.

To give a little bit of context, recently a decision was made in the project to make the development more active and the first task is to clear up older issues like this one to see if the OP is still interested in keep it going.

@FagnerMartinsBrack
Copy link
Member

FagnerMartinsBrack commented Apr 9, 2016

Closing due to the lack of feedback from the OP. Feel free to comment here to open up the discussion again

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

No branches or pull requests

3 participants