fit-text helper now triggers lazyily when slide enters view distance

This commit is contained in:
Hakim El Hattab
2020-06-09 10:28:01 +02:00
parent f231c53b9c
commit aa6677911c
6 changed files with 24 additions and 14 deletions

View File

@@ -25,8 +25,6 @@ import {
POST_MESSAGE_METHOD_BLACKLIST
} from './utils/constants.js'
import fitty from 'fitty';
// The reveal.js version
export const VERSION = '4.0.2';
@@ -283,15 +281,6 @@ export default function( revealElement, options ) {
dom.statusElement = createStatusElement();
dom.wrapper.setAttribute( 'role', 'application' );
// The r-fit-text helper resizes text to be as large as
// possible within its given container
fitty( '.r-fit-text', {
minSize: 24,
maxSize: config.height * 0.8,
observeMutations: false,
observeWindow: false
} );
}
/**