mbostock / stack

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

Adding sound support. #10

Closed drio closed 11 years ago

drio commented 11 years ago

Discussion about this here.

mbostock commented 11 years ago

I’m not inclined to add this to the library given that you can pretty easily implement it using the existing API (using activate / deactivate events plus a key event listener).

drio commented 11 years ago

But you would still need all the sounds.js logic. I can rewrite it so we use activate/deactivate events. Would that be fine? If not, that's alright, please close both the PR and the issue.

Thanks for looking into this Mike.

mbostock commented 11 years ago

Right, but I think that would make more sense in a separate library + example. If I can, I’d rather keep this library as small & simple as possible.

drio commented 11 years ago

Ok, makes sense. I will keep it in my account. I will send you the link, just in case you want to add it to the stacks' readme.

drio commented 11 years ago

How can I attach my listeners to the activate/deactivate events from outside stack? Should we expose event?

mbostock commented 11 years ago

stack.on("activate", function(i) { console.log(d3.event, i); })

drio commented 11 years ago

Thanks Mike. Ah.. you are actually rebinding on to the stack object.