bespokejs / bespoke

DIY Presentation Micro-Framework

Home Page:http://markdalgleish.com/projects/bespoke.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't activate first slide if slide is already active

mojavelinux opened this issue · comments

Do not attempt to activate the first slide (slide 0) after calling the plugins if a slide is already activated. This allows a plugin, such as bespoke-hash, to activate the first slide.

Additionally, when the first slide is activated, the deactivate event should not be called since there is no slide to deactivate.

One open question is what should happen if step is called by a plugin before a slide has been activated? Should the call to step be ignored? Or should it fire with a nil slide and then activate the first slide? Given that it has to step from somewhere, I think it should be ignored.

As it turns out, this is actually the behavior now. It does first an event on a nil slide, but then it activates the first slide (if offset is positive).