Closed JonP-16 closed 5 years ago
I believe this problem has now been fixed in shinyglide
, and it's not directly related to slickR
, so this issue might be closed.
for reference this is a simpler way to use slickR with plot outputs (without using the device to temporarily convert to pngs)
server <- function(input, output, session) {
showModal(
modalDialog(
title = "Startup assistant",
easyClose = TRUE,
footer = NULL,
glide(
screen(
p("Let's initialize some values, would you ?")
),
screen(
p("First, please select a mean value"),
numericInput("mean_modal", "Mean", value = 0)
),
screen(
p("Then, please select a sd value"),
numericInput("sd_modal", "SD", value = 1)
)
)
)
)
observeEvent(c(input$mean_modal,input$sd_modal),{
plotsToSVG <- replicate(2,expr = {
svglite::xmlSVG({plot(rnorm(20,input$mean_modal,input$sd_modal))
},standalone=TRUE)},simplify = FALSE)
imgs <- sapply(plotsToSVG,function(sv){paste0("data:image/svg+xml;utf8,",as.character(sv))})
output$slickr <- renderSlickR({slickR(imgs)})
})
}
Hi!
I posted this to the shinyglide github. It seems that whenever slickR is used, the 'glide' content of the modal gets very squished and unreadable. I'm not sure if this is your package or if it's shinyglide's package but I thought I should let you know.