For a given story_section()
, you may want to trigger an event when the section becomes visible.
This function wraps shiny::observeEvent()
to allow you to modify the state of your map or
invoke other Shiny actions on user scroll.
on_section(map_id, section_id, handler)
The ID of your map output
The ID of the section to trigger on, defined in story_section()
Expression to execute when section becomes visible.