Comments (6)
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.
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.
you are right. thanks!
from widgetframe.
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.
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.
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)
- crosstalk HOT 1
- Following render()'s self_contained FALSE and lib_dir HOT 3
- widgetframe in bookdown css problem HOT 12
- Full screen not working on iPhone widgetframe HOT 11
- frameWidget() returns <PATH> not found in RMarkdown documents HOT 16
- Cannot save a mapview object HOT 2
- shiny integration HOT 3
- Upgrade pym
- scrolling DT::datatable HOT 2
- Using widgetframe in md files HOT 1
- blogdown 404 error - double-slash between "figure-html" and "widgets" HOT 5
- not rendering in xaringan HOT 1
- xaringan print to pdf
- widgetframe can't find file in rmd HOT 7
- Unable to save html file using widgetframe::saveWidgetframe HOT 1
- Full window
- Support single file output with saveWidgetframe
- Pagedown
- Can not display in blogdown
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from widgetframe.