From 32a16295c3d63c463baa3594381cef8cf2146798 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Wed, 25 Jan 2023 14:13:31 +0100 Subject: [PATCH] Fixes typos --- js/controllers/autoanimate.js | 12 ++++++------ js/controllers/jumptoslide.js | 2 +- js/controllers/location.js | 2 +- js/controllers/plugins.js | 4 ++-- js/reveal.js | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/js/controllers/autoanimate.js b/js/controllers/autoanimate.js index 4e72e92..24eba32 100644 --- a/js/controllers/autoanimate.js +++ b/js/controllers/autoanimate.js @@ -461,7 +461,7 @@ export default class AutoAnimate { const textNodes = 'h1, h2, h3, h4, h5, h6, p, li'; const mediaNodes = 'img, video, iframe'; - // Eplicit matches via data-id + // Explicit matches via data-id this.findAutoAnimateMatches( pairs, fromSlide, toSlide, '[data-id]', node => { return node.nodeName + ':::' + node.getAttribute( 'data-id' ); } ); @@ -573,14 +573,14 @@ export default class AutoAnimate { // Retrieve the 'from' element if( fromMatches[key] ) { - const pimaryIndex = toMatches[key].length - 1; + const primaryIndex = toMatches[key].length - 1; const secondaryIndex = fromMatches[key].length - 1; // If there are multiple identical from elements, retrieve // the one at the same index as our to-element. - if( fromMatches[key][ pimaryIndex ] ) { - fromElement = fromMatches[key][ pimaryIndex ]; - fromMatches[key][ pimaryIndex ] = null; + if( fromMatches[key][ primaryIndex ] ) { + fromElement = fromMatches[key][ primaryIndex ]; + fromMatches[key][ primaryIndex ] = null; } // If there are no matching from-elements at the same index, // use the last one. @@ -608,7 +608,7 @@ export default class AutoAnimate { * fading of unmatched elements is turned on, these elements * will fade when going between auto-animate slides. * - * Note that parents of auto-animate targets are NOT considerd + * Note that parents of auto-animate targets are NOT considered * unmatched since fading them would break the auto-animation. * * @param {HTMLElement} rootElement diff --git a/js/controllers/jumptoslide.js b/js/controllers/jumptoslide.js index 904b447..cf2de99 100644 --- a/js/controllers/jumptoslide.js +++ b/js/controllers/jumptoslide.js @@ -1,5 +1,5 @@ /** - * Makes it possble to jump to a slide by entering its + * Makes it possible to jump to a slide by entering its * slide number or id. */ export default class JumpToSlide { diff --git a/js/controllers/location.js b/js/controllers/location.js index 811020b..6fa4829 100644 --- a/js/controllers/location.js +++ b/js/controllers/location.js @@ -139,7 +139,7 @@ export default class Location { let hash = this.getHash(); // If we're configured to push to history OR the history - // API is not avaialble. + // API is not available. if( config.history ) { window.location.hash = hash; } diff --git a/js/controllers/plugins.js b/js/controllers/plugins.js index bc97918..88f57bf 100644 --- a/js/controllers/plugins.js +++ b/js/controllers/plugins.js @@ -12,7 +12,7 @@ export default class Plugins { // Flags our current state (idle -> loading -> loaded) this.state = 'idle'; - // An id:instance map of currently registed plugins + // An id:instance map of currently registered plugins this.registeredPlugins = {}; this.asyncDependencies = []; @@ -171,7 +171,7 @@ export default class Plugins { /** * Registers a new plugin with this reveal.js instance. * - * reveal.js waits for all regisered plugins to initialize + * reveal.js waits for all registered plugins to initialize * before considering itself ready, as long as the plugin * is registered before calling `Reveal.initialize()`. */ diff --git a/js/reveal.js b/js/reveal.js index 8ff784f..50e17d6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1251,7 +1251,7 @@ export default function( revealElement, options ) { */ function slide( h, v, f, origin ) { - // Dispatch an event before hte slide + // Dispatch an event before the slide const slidechange = dispatchEvent({ type: 'beforeslidechange', data: { @@ -1852,7 +1852,7 @@ export default function( revealElement, options ) { } // If includeFragments is set, a route will be considered - // availalbe if either a slid OR fragment is available in + // available if either a slid OR fragment is available in // the given direction if( includeFragments === true ) { let fragmentRoutes = fragments.availableRoutes();