shinyanimate icon indicating copy to clipboard operation
shinyanimate copied to clipboard

Session

Open JohnCoene opened this issue 6 years ago • 2 comments

Removed the need to pass session to the animate functions :)

This way you can simply use it like so:

library(shiny)
library(shinyanimate)
ui <- fluidPage(
  withAnim(),
  div( id = 'shinyLogo', tags$img(src= "https://www.rstudio.com/wp-content/uploads/2014/04/shiny-600x695.png", width = "100px", height = "100px")),
  actionButton(inputId = "button", label = "Animate")
)
server <- function(input, output, session) {
  observeEvent(input$button,{
    startAnim('shinyLogo', 'shake') # no session
  })
}
shinyApp(ui, server)

JohnCoene avatar Mar 23 '19 16:03 JohnCoene

Removed the need to pass session to the animate functions :)

This way you can simply use it like so:

library(shiny)
library(shinyanimate)
ui <- fluidPage(
  withAnim(),
  div( id = 'shinyLogo', tags$img(src= "https://www.rstudio.com/wp-content/uploads/2014/04/shiny-600x695.png", width = "100px", height = "100px")),
  actionButton(inputId = "button", label = "Animate")
)
server <- function(input, output, session) {
  observeEvent(input$button,{
    startAnim('shinyLogo', 'shake') # no session
  })
}
shinyApp(ui, server)

@JohnCoene It is good that we do not have to pass session anymore but with this change it won't be backward compatible and this would be a breaking change. So I'll keep this PR on hold for the moment until we do not add more features so that breaking changes would be acceptable.

Swechhya avatar Apr 04 '19 06:04 Swechhya

Sure your call :)

JohnCoene avatar Apr 09 '19 12:04 JohnCoene