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

"in" and "out" transiton definitions #674

Closed
srigi opened this issue Oct 26, 2013 · 8 comments
Closed

"in" and "out" transiton definitions #674

srigi opened this issue Oct 26, 2013 · 8 comments

Comments

@srigi
Copy link

srigi commented Oct 26, 2013

Sometimes I need to present code evolution - on first slide there is a basic code, then there is some change highlighted on next slide. Between this two slides should be no transition so I set data-transition="none" on both.

But by this first slide is not nicely animated when I navigate to it from prev. slide. And so the second slide in not nicely kick-outed when moving to next section.

Best demonstrated on live example. Ad you can see code on second slide kicks-in not nicely. Then there is code evolution demonstration and then code kicks-out without animation.

I propose:

  • new transition definition data-transition-in & data-transition-in
    or
  • some kind of logic between when two data-transition definitions meets on sibling slides.
@knoid
Copy link

knoid commented Feb 19, 2014

+1

1 similar comment
@tasmo
Copy link

tasmo commented May 1, 2014

+1

@mattymatty
Copy link

+1 please

@mattymatty
Copy link

What if it was a transition between definition? Or a transition next definition?

Maybe transition next would be easier. The set up would be:
slide1_transition next[slide]
slide2_transition next[none]
slide3 (doesn't need transition_next cause it's the last slide)

The logic would be:
Going from slide1 to 2: transition would be slide (slides 1 and 2 would both slide)
Going from slide2 to 3: transition would be none (slides 2 and 3 would have no transition)
Going from slide3 to 2: transition would be none (slides 3 and 2 would have no transition)
Going from slide2 to 1: transition would be slide (slides 2 and 1 would both slide)

@jwlrs
Copy link

jwlrs commented Sep 1, 2014

+100

@jwlrs
Copy link

jwlrs commented Sep 1, 2014

Hacky solution that helps you going in the forward direction:

Reveal.addEventListener( 'slidechanged', function( event ) {
    //this way when you move forward, you use the next slide's transition.
    //doesn't help you going backwards, but whatevs
    var nextSlide = event.currentSlide.nextSibling.nextSibling; 
    var nextTrans = nextSlide.getAttribute('data-transition') || '';

    event.currentSlide.setAttribute('data-transition', nextTrans);
} );

The nextSlide = event.currentSlide.nextSibling.nextSibling assumes that your section tags are followed by a textNode and then another section. Tweak as necessary

@obama
Copy link

obama commented Jan 26, 2015

+1

@hakimel
Copy link
Owner

hakimel commented May 6, 2015

Support for separate in/out transitions was added by @jammon in #1106

(only in the dev branch so far, will be released with 3.1)

@hakimel hakimel closed this as completed May 6, 2015
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

7 participants