Closed JsLth closed 5 months ago
When using a waiter on a Leaflet widget, the waiter element seems to cover only parts of the map. I'm using the newest version 0.2.5. This might be related to #126, but I'm not sure. Here's a reprex:
library(waiter) library(shiny) library(leaflet) ui <- fluidPage( use_waiter(), leafletOutput("map", 400), actionButton("reload", "Reload map") ) server <- function(input, output, session) { waiter <- Waiter$new( id = "map", html = tagList(spin_pulse(), h4("Loading map...")) ) output$map <- renderLeaflet({ waiter$show() on.exit(waiter$hide()) Sys.sleep(3) leaflet(data = breweries91) %>% addMarkers() }) %>% bindEvent(input$reload, ignoreNULL = FALSE) } runApp(shinyApp(ui, server))
This issue seems to be different in different circumstances. Here is what I noticed:
When initializing the map, everything looks fine.
When re-rendering, the waiter shows a gap on the left side.
When rendering in a bs4Dash::box, the gap is wider and also shows at the top. Here's the code for the UI:
library(bs4Dash) ui <- dashboardPage( dashboardHeader(), dashboardSidebar( sidebarMenu( menuItem(text = "map", tabName = "mapTab") ) ), dashboardBody( use_waiter(), tabItem( tabName = "mapTab", box( leafletOutput("map"), actionButton("reload", "Reload map") ) ) ) )
Thank for the detailed bug report and reproducible example, I will take a look at that as soon as I have the time!
Took me long enough, apologies, just pushed a fix.
Thanks again for reporting this.
When using a waiter on a Leaflet widget, the waiter element seems to cover only parts of the map. I'm using the newest version 0.2.5. This might be related to #126, but I'm not sure. Here's a reprex:
This issue seems to be different in different circumstances. Here is what I noticed:
When initializing the map, everything looks fine.
When re-rendering, the waiter shows a gap on the left side.
When rendering in a bs4Dash::box, the gap is wider and also shows at the top. Here's the code for the UI: