center align leaflet htmlwidget quarto revealjs

I have been changing my xaringan presentations over to quarto revealjs presentations which has spurred me on to include an interactive map within a presentation. However, I seem to have hit a minor problem.

When I add a leaflet map I can't seem to horizontally center it on the slide using the fig-align code chunk option but interestingly the fig-width option does allow adjustment of the width of the map.

Is this a known problem? or have I missed a very obvious way of doing this?

qmd reprex below:

format: revealjs

## htmlwidget not centered

#| label: leaflet-map
#| fig-align: center
#| fig-width: 4


leaflet() %>% 

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.