1
0
Эх сурвалжийг харах

make it possible to disable hash change listener with respondToHashChanges: false

Hakim El Hattab 5 жил өмнө
parent
commit
772fa0308d

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/reveal.esm.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/reveal.js


+ 3 - 0
js/config.js

@@ -62,6 +62,9 @@ export default {
 	// page/copying the URL will return you to the same slide
 	// page/copying the URL will return you to the same slide
 	hash: false,
 	hash: false,
 
 
+	// Flags if we should monitor the hash and change slides accordingly
+	respondToHashChanges: true,
+
 	// Push each slide change to the browser history.  Implies `hash: true`
 	// Push each slide change to the browser history.  Implies `hash: true`
 	history: false,
 	history: false,
 
 

+ 1 - 1
js/reveal.js

@@ -487,8 +487,8 @@ export default function( revealElement, options ) {
 		if( config.touch ) touch.bind();
 		if( config.touch ) touch.bind();
 		if( config.keyboard ) keyboard.bind();
 		if( config.keyboard ) keyboard.bind();
 		if( config.progress ) progress.bind();
 		if( config.progress ) progress.bind();
+		if( config.respondToHashChanges ) location.bind();
 		controls.bind();
 		controls.bind();
-		location.bind();
 
 
 		dom.slides.addEventListener( 'transitionend', onTransitionEnd, false );
 		dom.slides.addEventListener( 'transitionend', onTransitionEnd, false );
 		dom.pauseOverlay.addEventListener( 'click', resume, false );
 		dom.pauseOverlay.addEventListener( 'click', resume, false );

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно