1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-09 08:06:48 +02:00

fix issues with overflowing fit-text when exporting to pdf #3191 #3120

This commit is contained in:
hakimel
2022-05-31 11:50:26 +02:00
parent a3f4caf179
commit 5a031c07b6
8 changed files with 12 additions and 16 deletions

View File

@@ -186,15 +186,14 @@ export default class SlideContent {
}
/**
* Applies JS-dependent layout helpers for the given slide,
* if there are any.
* Applies JS-dependent layout helpers for the scope.
*/
layout( slide ) {
layout( scopeElement ) {
// Autosize text with the r-fit-text class based on the
// size of its container. This needs to happen after the
// slide is visible in order to measure the text.
Array.from( slide.querySelectorAll( '.r-fit-text' ) ).forEach( element => {
Array.from( scopeElement.querySelectorAll( '.r-fit-text' ) ).forEach( element => {
fitty( element, {
minSize: 24,
maxSize: this.Reveal.getConfig().height * 0.8,