You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:::{focus-on="cr-map,cr-popup"}
Here is a map with a popup on top!
:::
:::{#cr-map}

:::
:::{#cr-popup}
I love this map!
:::
General idea
focus-on can take multiple stickies separated by commas. They will all get cr-active added to them as well as a z-index where the first sticky is the baselayer.
This could also be extended to [@cr-map; @cr-popup], which is valid Quarto crossref syntax.
Open Questions
How to pass effects attributes? How will we know which sticky they're meant for?
Those questions suggest an alternative approach, which is to keep one-sticky per trigger, but allow them to be nested. So:
:::{focus-on="cr-popup"}
:::{focus-on="cr-map"}
Here is a map with a popup on top!
:::
:::
:::{#cr-map}

:::
:::{#cr-popup}
I love this map!
:::
Hmm, looking at it this way... I think I prefer this approach. It's lengthier syntax but it seems easier to think about since its a simple use of the existing approach (cr-popup is also literally on top of cr-map, so it's obvious what this will look like). In fact, if this doesn't work already, it should be very easy to implement.
Thoughts?
The text was updated successfully, but these errors were encountered:
Thinking about it a bit more: I'm not sure how scrollama will deal with nested steps. Will the one event listener pick up on both steps triggering simultaneously and run UpdateStickies simultaneously?
Mmmm, I'll not sure either - I think if you had nested levels you'd want to run them as separate Scrollama instances, otherwise you're going to have inconsistency going up/down and also problems with the scroll % counter 🤔 So then you'd want a global state manager that tracks a list of Scrollama instances...
@jimjam-slam
Allow for the following syntax:
General idea
focus-on
can take multiple stickies separated by commas. They will all getcr-active
added to them as well as a z-index where the first sticky is the baselayer.This could also be extended to
[@cr-map; @cr-popup]
, which is valid Quarto crossref syntax.Open Questions
How to pass effects attributes? How will we know which sticky they're meant for?
Those questions suggest an alternative approach, which is to keep one-sticky per trigger, but allow them to be nested. So:
Hmm, looking at it this way... I think I prefer this approach. It's lengthier syntax but it seems easier to think about since its a simple use of the existing approach (
cr-popup
is also literally on top ofcr-map
, so it's obvious what this will look like). In fact, if this doesn't work already, it should be very easy to implement.Thoughts?
The text was updated successfully, but these errors were encountered: