RinteRface / fullPage

📄 fullPage.js, pagePiling.js and multiScroll.js for shiny
https://fullpage.rinterface.com
Other
110 stars 12 forks source link

scrollOverflow not working in fullPage ? #19

Open mzuer opened 1 year ago

mzuer commented 1 year ago

Hi

Thanks again for this amazing package :-)

In a fullPage, I would like to o be able to move down a ''high'' page by mouse scrolling without moving to next page. I believed that the scrollOverflowoption is made for this purpose, isn'it ?

I was not able to make it work, for example with the example taken from here :

How could I achieve that ?

Thanks in advance for any help...

library(shiny)
library(fullPage)

options <- list(
  sectionsColor = c('#f2f2f2', '#4BBFC3', '#7BAABE'),
  parallax = TRUE,
 scrollOverflow =TRUE
)

ui <- fullPage(
  menu = c("Full Page" = "link1",
           "Sections" = "link2",
           "link3" = "End"),
  opts = options,
  fullSection(
    center = TRUE,
    menu = "link1",
    tags$h1("fullPage.js meets Shiny")
  ),
  fullSection(
    menu = "link2",
    fullContainer(
      fullRow(
        fullColumn(
          h3("Column 1"),
          selectInput(
          "dd",
          "data points",
          choices = c(10, 20, 30)
          )
        ),
        fullColumn(
          plotOutput("hist")
        ),
        fullColumn(
          plotOutput("plot")
        )
      )
    )
  ),
  fullSection(
    center = TRUE,
    menu = "link3",
    tags$h1("END")
  )
)

server <- function(input, output){

  output$plot <- renderPlot({
    hist(rnorm(input$dd, 1, 10))
  })

  output$hist <- renderPlot({
    hist(rnorm(input$dd, 1, 10))
  })

}

shinyApp(ui, server)