Description Usage Arguments Examples
Prevents accidental map scrolling when scrolling in a document.
1 2 3 | suspendScroll(map, sleep = TRUE, sleepTime = 750, wakeTime = 750,
sleepNote = TRUE, hoverToWake = TRUE,
wakeMessage = "Click or Hover to Wake", sleepOpacity = 0.7)
|
map |
The leaflet map |
sleep |
false if you want an unruly map |
sleepTime |
time(ms) until map sleeps on mouseout |
wakeTime |
time(ms) until map wakes on mouseover |
sleepNote |
should the user receive wake instructions? |
hoverToWake |
should hovering wake the map? (non-touch devices only) |
wakeMessage |
a message to inform users about waking the map |
sleepOpacity |
opacity for the sleeping map |
1 2 3 4 | leaflet(width = "100%") %>%
setView(0, 0, 1) %>%
addTiles() %>%
suspendScroll()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.