Yang-Tang/shinyjqui

Width = 100% lost when using shinyjqui

fmmattioni opened this issue · 2 comments

I have a shiny app where I use the shinyjqui package to let users resize a graph. The problem is that the graph does not resize automatically anymore according to the window size. For example, if I access the shiny app using half of the window width, it won't resize automatically if I maximize the window. Any thoughts?

reprex:

library(shiny)
library(dplyr)
library(shinyjqui)
library(ggplot2)

ui <- fluidPage(
  plotOutput(outputId = "p", width = "100%", height = "400px") %>% 
    jqui_resizable()
)

server <- function(input, output, session) {
  output$p <- renderPlot({
    ggplot(mtcars, aes(mpg, hp)) +
      geom_point()
  })
}

shinyApp(ui, server)

Hi @fmmattioni I thinks this is a desired behavior, because what resizable did is to switch from auto to manually sizing.

Got it! Thanks for the reply!