1
0
Fork 0

add sortFragmentsOnSync option, makes it possible to avoid unwanted sorting in editing environments like slides.com

This commit is contained in:
Hakim El Hattab 2023-02-16 09:48:48 +07:00
parent ea6b7197c7
commit 7de6ccb65b
6 changed files with 11 additions and 5 deletions

2
dist/reveal.esm.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/reveal.js vendored

File diff suppressed because one or more lines are too long

2
dist/reveal.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -287,6 +287,10 @@ export default {
// Time before the cursor is hidden (in ms) // Time before the cursor is hidden (in ms)
hideCursorTime: 5000, hideCursorTime: 5000,
// Should we automatmically sort and set indices for fragments
// at each sync? (See Reveal.sync)
sortFragmentsOnSync: true,
// Script dependencies to load // Script dependencies to load
dependencies: [], dependencies: [],

View File

@ -1471,7 +1471,9 @@ export default function( revealElement, options ) {
// Write the current hash to the URL // Write the current hash to the URL
location.writeURL(); location.writeURL();
if( config.sortFragmentsOnSync === true ) {
fragments.sortAll(); fragments.sortAll();
}
controls.update(); controls.update();
progress.update(); progress.update();