quarto-dev / quarto-dev/quarto-cli
`fig-align: center` for leaflet in revealjs
Open
@cderv is already working on this.
Since Dec 28, 2023.
enhancement
revealjs
themes
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
From https://community.rstudio.com/t/center-align-leaflet-htmlwidget-quarto-revealjs/178362
---
format: revealjs
---
## htmlwidget not centered
```{r}
#| label: leaflet-map
#| fig-align: center
#| fig-width: 4
library(leaflet)
leaflet() %>%
addTiles()
```
this is not centered...
should it work ? 🤔
Or just unssuported option silently ignored ?
Intermediate md
---
format: revealjs
keep-md: true
---
## htmlwidget not centered
::: {.cell layout-align="center"}
::: {.cell-output-display}
```{=html}
<div class="leaflet html-widget html-fill-item" id="htmlwidget-5965e865d730b27e718d" style="width:384px;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-5965e865d730b27e718d">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"calls":[{"method":"addTiles","args":["https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,null,{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"© <a href=\"https://openstreetmap.org/copyright/\">OpenStreetMap<\/a>, <a href=\"https://opendatacommons.org/licenses/odbl/\">ODbL<\/a>"}]}]},"evals":[],"jsHooks":[]}</script>
```
:::
:::
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.