Description Usage Arguments Details See Also Examples
Uses Pym.js. Pym.js embeds and resizes an iframe responsively (width and height) within its parent container. It also bypasses the usual cross-domain issues.
1 2 | frameWidget(targetWidget, width = "100%", height = NULL,
elementId = NULL, options = frameOptions())
|
targetWidget |
The widget to embed inside an iframe. |
width |
Defaults to 100 100, 200 (in pixel). This will override the width of the enclosed widget. |
height |
Defaults to NULL. You can either specify '10 100, 200 (in pixel). This will override the height of the enclosed widget. |
elementId |
The element ID of the parent widget. |
options |
Options for the iframe. |
This widget can be used in places where a HTML page's CSS rules or Javascript code can cause issues in a widget. Wrapping your widgets this way allows for the widget code to be unaffected by the parent HTML's CSS/JS. The target widget is conveniently displaed in a responsive iframe and not subject to parent HTML's CSS/JS.
1 2 3 4 5 | ## Not run:
l <- leaflet() %>% addTiles() %>% setView(0,0,1)
frameWidget(l)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.