-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leaflet map breaks out of 'viewport' when using shinybusy #18
Comments
Hello, Thanks, indeed it makes something strange, I don't have a solution yet, I will investigate. Victor |
Thanks Victor! |
Hello @graemediack, I noticed that, for some reason, using library(shiny)
library(leaflet)
library(shinybusy)
ui <- fluidPage(
tags$head(
tags$style(
HTML("#map {
position: relative
}")
)
),
titlePanel("Shiny Busy Behaviour with Leaflet"),
mainPanel(
add_loading_state(
"#map",
spinner = "arrows",
timeout = 1500,
text = "Please wait...",
svgColor = "steelblue"
),
leafletOutput("map")
)
)
server <- function(input, output) {
output$map <- renderLeaflet({
leaflet () %>%
addProviderTiles(providers$Stamen.Toner, group = "Dark") %>%
addProviderTiles(providers$Stamen.TonerLite, group = "Light") %>%
addLayersControl(baseGroups = c("Dark", "Light"),options = layersControlOptions(collapsed = FALSE))
})
}
shinyApp(ui = ui, server = server) I don't know why this CSS rule disappears when using |
Thanks @etiennebacher, good find! |
I've noticed that when using shinybusy add_loading_state with a leaflet map it causes it to display map outside of the 'normal' leaflet viewport (apologies, I don't know the correct terminology there) See below app.R for simple error reproduction. Thanks!
The text was updated successfully, but these errors were encountered: