It was a long time ago. I can delve into the code if you're interested, the main thing here is that it added to the whole notebook iframe (all cells one after the other) rather than limited to one cell.
The purpose was to use it as an infrastructure for online courses : you get a short video illustrating each paragraph, and each time you reach a new paragraph/cell/div/whatever, the video changes or goes to the relevant video time.
Does all that answer your question?
> each time you reach a new paragraph/cell/div/whatever, the video changes or goes to the relevant video time
That sounds like a pretty neat idea. I'll try to find a way to incorporate it into the notebook.
> Does all that answer your question?
I guess! When people copy code instead of importing, it can hint at bad API design. In this case it looks like you only added a line (mutable focale) to makeSticky(), but left ViewportObservabler unchanged.
Would it work for you to have an onUpdate() callback option in makeSticky() so that you can import both cells? The callback would receive both rects, the viewport range and the new offset.
Sure, thank you for considering it! However, there are several things to consider here:
- this is a hacky thing : it still works fine after more than a year, but Observable's CSS or server-side changes might break it and we'll have no power over it.
- I do not have an implemented use case : I wanted to create a kind of "nandtotetris" course system where students would play with cells to learn how to code, and the video would give hints / context / whatever when the relevant cell is focused. It never happened for many reasons unrelated to the core idea, but long story short this isn't used anywhere.
So if you think this is worth your time, go ahead. I think the concept is interesting and might help people out there with similar interests (like observable's education network). But no worries if you don't, as this might very well break in the future for reasons out of our control.