瀏覽代碼

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

Hakim El Hattab 2 年之前
父節點
當前提交
7de6ccb65b
共有 6 個文件被更改,包括 7 次插入1 次删除
  1. 0 0
      dist/reveal.esm.js
  2. 0 0
      dist/reveal.esm.js.map
  3. 0 0
      dist/reveal.js
  4. 0 0
      dist/reveal.js.map
  5. 4 0
      js/config.js
  6. 3 1
      js/reveal.js

文件差異過大導致無法顯示
+ 0 - 0
dist/reveal.esm.js


文件差異過大導致無法顯示
+ 0 - 0
dist/reveal.esm.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/reveal.js


文件差異過大導致無法顯示
+ 0 - 0
dist/reveal.js.map


+ 4 - 0
js/config.js

@@ -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: [],
 

+ 3 - 1
js/reveal.js

@@ -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();

部分文件因文件數量過多而無法顯示