Giter Site home page Giter Site logo

Comments (6)

yonicd avatar yonicd commented on June 11, 2024

nm got it.

library(leaflet)
library(widgetframe)
library(slickR)

l <- leaflet() %>% addTiles()
htmlwidgets::saveWidget(frameableWidget(l),'leaflet.html')

slickR(rep(paste0(readLines('leaflet.html'),collapse='\n'),4),slideType = rep('iframe',2),slickOpts = list(dots=T,slidesToShow=2,slidesToScroll=2))

from widgetframe.

bhaskarvk avatar bhaskarvk commented on June 11, 2024

Yup I was going to suggest the same for you. Cool that you got it on your own.
Btw if slickR is already taking care of adding the <iframe> HTML element, you may not need widgetframe after all.
You can simply do

library(leaflet)
library(widgetframe)
library(slickR)

l <- leaflet() %>% addTiles()
htmlwidgets::saveWidget(l,'leaflet.html')

slickR(rep(paste0(readLines('leaflet.html'),collapse='\n'),4),slideType = rep('iframe',2),slickOpts = list(dots=T,slidesToShow=2,slidesToScroll=2))

The only thing frameableWidget does is add the pym.js child initialization code, which you may not need if slickR is not using pym.js.

from widgetframe.

yonicd avatar yonicd commented on June 11, 2024

you are right. thanks!

from widgetframe.

bhaskarvk avatar bhaskarvk commented on June 11, 2024

Btw if you do end up using widgetframe, do setup Pym.js and Parent in the parent widget, it will give you responsive iframes, which are really nice.

from widgetframe.

yonicd avatar yonicd commented on June 11, 2024

responsive in what way? resizing?

kent russell just fixed my js code to get slick to run in rmarkdown. so now it works in rmarkdown and shiny.

from widgetframe.

yonicd avatar yonicd commented on June 11, 2024

hey.

this doesnt give a reactive html anymore

library(leaflet)
library(dplyr)
l <- leaflet() %>% addTiles()
htmlwidgets::saveWidget(l,'leaflet.html')

what could be the reason?

from widgetframe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.