update logic for disabling fragments via config option
This commit is contained in:
@ -14,10 +14,10 @@ export default class Fragments {
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows all fragments in the presentation. Used when
|
||||
* fragments are disabled presentation-wide.
|
||||
* If fragments are disabled in the deck, they should all be
|
||||
* visible rather than stepped through.
|
||||
*/
|
||||
showAll() {
|
||||
disable() {
|
||||
|
||||
toArray( this.Reveal.getSlidesElement().querySelectorAll( '.fragment' ) ).forEach( element => {
|
||||
element.classList.add( 'visible' );
|
||||
@ -26,6 +26,19 @@ export default class Fragments {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse of #disable(). Only called if fragments have
|
||||
* previously been disabled.
|
||||
*/
|
||||
enable() {
|
||||
|
||||
toArray( this.Reveal.getSlidesElement().querySelectorAll( '.fragment' ) ).forEach( element => {
|
||||
element.classList.remove( 'visible' );
|
||||
element.classList.remove( 'current-fragment' );
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an object describing the available fragment
|
||||
* directions.
|
||||
|
Reference in New Issue
Block a user