Skip to content

Commit

Permalink
add sortFragmentsOnSync option, makes it possible to avoid unwanted s…
Browse files Browse the repository at this point in the history
…orting in editing environments like slides.com
  • Loading branch information
hakimel committed Feb 16, 2023
1 parent ea6b719 commit 7de6ccb
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/reveal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ export default {
// Time before the cursor is hidden (in ms)
hideCursorTime: 5000,

// Should we automatmically sort and set indices for fragments
// at each sync? (See Reveal.sync)
sortFragmentsOnSync: true,

// Script dependencies to load
dependencies: [],

Expand Down
4 changes: 3 additions & 1 deletion js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,9 @@ export default function( revealElement, options ) {
// Write the current hash to the URL
location.writeURL();

fragments.sortAll();
if( config.sortFragmentsOnSync === true ) {
fragments.sortAll();
}

controls.update();
progress.update();
Expand Down

0 comments on commit 7de6ccb

Please sign in to comment.