dreamRs / shinybusy

Minimal busy indicator for Shiny apps
https://dreamrs.github.io/shinybusy/
Other
138 stars 16 forks source link

banana.gif not dancing #6

Open Patrikios opened 4 years ago

Patrikios commented 4 years ago

Hi, I am on firewall regulated network, so online access to js dependencies might be an issue. I cannot make the gifs to animate. The .gif is located in the www folder. The example that you provide, my fav - the dancing banana, the banana just sits statically in the top right corner. The ffox console is showing: freezeframe.js : image not done processing ! banana.gif

Any idea what would work?

pvictor commented 4 years ago

Hello, Are you using the dancing banana from here : https://jeroen.github.io/images/banana.gif or from www ? This message generally appear when images is not available.

Victor

Patrikios commented 4 years ago

The gif is saved locally in the www folder of the shiny app directory.

pvictor commented 4 years ago

What code did you use ?

Patrikios commented 4 years ago

Something along these lines:

ui <- tagList(
  useShinydashboard(),
  shinybusy::add_busy_gif(src = "banana.gif", height = 40, width = 40),
  tags$head(
                    ...),
  tags$style(
                    ...),
  navbarPage(id = "menus", ...
pvictor commented 4 years ago

Everything seems fine, what browser do you use ? Have you tried with an another gif ? Can you try :

library(shiny)
library(shinybusy)

ui <- fluidPage(
  add_busy_gif(
    src = logo_silex(),
    height = 100, width = 100
  ),
  actionButton("sleep", "After pressing the button, GIF should spin")
)

server <- function(input, output, session) {
  observeEvent(input$sleep, {
    Sys.sleep(5)
  })
}

shinyApp(ui, server)