Merge branch 'hakimel:master' into main
This commit is contained in:
@@ -49,7 +49,7 @@ export default class Location {
|
||||
// If the first bit is not fully numeric and there is a name we
|
||||
// can assume that this is a named link
|
||||
if( !/^[0-9]*$/.test( bits[0] ) && name.length ) {
|
||||
let element;
|
||||
let slide;
|
||||
|
||||
let f;
|
||||
|
||||
@@ -62,12 +62,14 @@ export default class Location {
|
||||
|
||||
// Ensure the named link is a valid HTML ID attribute
|
||||
try {
|
||||
element = document.getElementById( decodeURIComponent( name ) );
|
||||
slide = document
|
||||
.getElementById( decodeURIComponent( name ) )
|
||||
.closest('.slides>section, .slides>section>section');
|
||||
}
|
||||
catch ( error ) { }
|
||||
|
||||
if( element ) {
|
||||
return { ...this.Reveal.getIndices( element ), f };
|
||||
if( slide ) {
|
||||
return { ...this.Reveal.getIndices( slide ), f };
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -2203,7 +2203,7 @@ export default function( revealElement, options ) {
|
||||
|
||||
if( currentSlide && config.autoSlide !== false ) {
|
||||
|
||||
let fragment = currentSlide.querySelector( '.current-fragment' );
|
||||
let fragment = currentSlide.querySelector( '.current-fragment[data-autoslide]' );
|
||||
|
||||
let fragmentAutoSlide = fragment ? fragment.getAttribute( 'data-autoslide' ) : null;
|
||||
let parentAutoSlide = currentSlide.parentNode ? currentSlide.parentNode.getAttribute( 'data-autoslide' ) : null;
|
||||
@@ -2705,6 +2705,10 @@ export default function( revealElement, options ) {
|
||||
loadSlide: slideContent.load.bind( slideContent ),
|
||||
unloadSlide: slideContent.unload.bind( slideContent ),
|
||||
|
||||
// Media playback
|
||||
startEmbeddedContent: () => slideContent.startEmbeddedContent( currentSlide ),
|
||||
stopEmbeddedContent: () => slideContent.stopEmbeddedContent( currentSlide, { unloadIframes: false } ),
|
||||
|
||||
// Preview management
|
||||
showPreview,
|
||||
hidePreview: closeOverlay,
|
||||
|
||||
Reference in New Issue
Block a user