mbostock / stack

A presentation library with intuitive, scroll-based navigation.
https://mbostock.github.io/stack/
Other
1.16k stars 163 forks source link

location.hash support #6

Closed tmcw closed 11 years ago

tmcw commented 11 years ago

Using stack for a presentation, and it's working great. It would be great for it to use hashes for slide indices so that you can link to individual slides - I could whip up a pull req if that sounds good.

mbostock commented 11 years ago

Sounds great! Would love this feature. My only request is that you use location.replace to avoid polluting the history (the back button should leave the page entirely, not go between slides), and only update the hash when the slide changes to avoid address bar flickering.

Another feature I would love to see is the ESC button would zoom out and display all slides in a flow layout. Reveal.js has this lovely feature and I’ve always been jealous. ;)