Skip to contents

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.

Usage

on_section(map_id, section_id, handler)

Arguments

map_id

The ID of your map output

section_id

The ID of the section to trigger on, defined in story_section()

handler

Expression to execute when section becomes visible.