-
Notifications
You must be signed in to change notification settings - Fork 14
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
slickR shiny vignette broken #51
Comments
thanks for opening the issue, will investigate |
This should fix the problem which was having the same ID for two elements in the app. you can install this branch and it should run fine The reactive text will observing the carousels will be attached to the last carousel built ie if only 1 carousel the slick1 if two carousels it will track slick2 here is the specific fix: output$slick_output <- renderSlickR({
x <- slickR(plots(),
slideId = 'slick1',
height = 600,
width = '50%') +
settings(slidesToShow=3,centerMode=TRUE)
y <- slickR(plots(),
slideId = 'slick2',
height = 600,
width = '50%') +
settings(slidesToShow=3,centerMode=TRUE)
switch(input$slick_type,
'single' = x,
'stack' = x %stack% y,
'synch' = x %synch% y
)
}) |
ha nice. i'll take another look |
try this commit 417fd60 it should accommodate multiple sliders in the same app including the observers to know which is active |
Using your latest commit the vignette runs fine! Thanks for your time and effort! |
Just saw that the description given in the vignette needs to be aligned with the actual outputs: .clicked_slide != .clicked etc. (_slide suffix needs to be removed.. or added) Using this you can interact server-side "on click" of the active carousel .clicked _slide : The index of the clicked element| We will store this information in a new reactive environment shiny::observeEvent(input$slick_output_current,{ clicked_slide <- input$slick_output_current$.clicked |
Thanks for the comment 👍 |
I just realized, that when using 417fd60 there still is an issue: when stack is selected and we are going back to single both carousels remain. Furthermore
(svglite was installed via: |
you are right. the way the js is written only 1 slider is being removed because it is removing based on the number of slicks that are being created and not the existing ones. so when moving from 2 to 1 it is looking for only 1. the original code was written assuming you are updating the same number of slicks every time. |
this should fix the issue 3505e63 |
closed with pr #56 |
I just tried to run the slickR shiny vignette but it seems to be broken.
Once the
radioButtons
are used to switch to stacked or synch mode theinput$slick_output_current
isn't providing any data.Also the lower carousel isn't rendered properly:
The text was updated successfully, but these errors were encountered: