Skip to content

Session #3

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Session #3

wants to merge 2 commits into from

Conversation

JohnCoene
Copy link

@JohnCoene JohnCoene commented Mar 23, 2019

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)

@Swechhya Swechhya added the enhancement New feature or request label Mar 26, 2019
@Swechhya
Copy link
Owner

Swechhya commented Apr 4, 2019

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 Swechhya added the on hold This PR is on hold and should not be merged label Apr 4, 2019
@JohnCoene
Copy link
Author

Sure your call :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on hold This PR is on hold and should not be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants