Explorar o código

only call slide() if route is available in navigate methods (closes #213)

Hakim El Hattab %!s(int64=13) %!d(string=hai) anos
pai
achega
9da9726403
Modificáronse 2 ficheiros con 9 adicións e 9 borrados
  1. 6 6
      js/reveal.js
  2. 3 3
      js/reveal.min.js

+ 6 - 6
js/reveal.js

@@ -1,5 +1,5 @@
 /*!
- * reveal.js 2.1 r36
+ * reveal.js 2.1 r37
  * http://lab.hakim.se/reveal-js
  * MIT licensed
  *
@@ -1014,28 +1014,28 @@ var Reveal = (function(){
 
 	function navigateLeft() {
 		// Prioritize hiding fragments
-		if( isOverviewActive() || previousFragment() === false ) {
+		if( availableRoutes().left && ( isOverviewActive() || previousFragment() === false ) ) {
 			slide( indexh - 1, 0 );
 		}
 	}
 
 	function navigateRight() {
 		// Prioritize revealing fragments
-		if( isOverviewActive() || nextFragment() === false ) {
+		if( availableRoutes().right && ( isOverviewActive() || nextFragment() === false ) ) {
 			slide( indexh + 1, 0 );
 		}
 	}
 
 	function navigateUp() {
 		// Prioritize hiding fragments
-		if( isOverviewActive() || previousFragment() === false ) {
+		if( availableRoutes().up && ( isOverviewActive() || previousFragment() === false ) ) {
 			slide( indexh, indexv - 1 );
 		}
 	}
 
 	function navigateDown() {
 		// Prioritize revealing fragments
-		if( isOverviewActive() || nextFragment() === false ) {
+		if( availableRoutes().down && ( isOverviewActive() || nextFragment() === false ) ) {
 			slide( indexh, indexv + 1 );
 		}
 	}
@@ -1057,7 +1057,7 @@ var Reveal = (function(){
 				var previousSlide = document.querySelector( '.reveal .slides>section.past:nth-child(' + indexh + ')' );
 
 				if( previousSlide ) {
-					indexv = ( previousSlide.querySelectorAll('section').length + 1 ) || 0;
+					indexv = ( previousSlide.querySelectorAll( 'section' ).length + 1 ) || 0;
 					indexh --;
 					slide();
 				}

+ 3 - 3
js/reveal.min.js

@@ -1,5 +1,5 @@
 /*!
- * reveal.js 2.1 r36
+ * reveal.js 2.1 r37
  * http://lab.hakim.se/reveal-js
  * MIT licensed
  *
@@ -62,8 +62,8 @@ r("fragmentshown",{fragment:am[0]});return true;}}else{var al=document.querySele
 r("fragmentshown",{fragment:al[0]});return true;}}return false;}function Q(){if(document.querySelector(b+".present")){var am=document.querySelectorAll(b+".present .fragment.visible");
 if(am.length){am[am.length-1].classList.remove("visible");r("fragmenthidden",{fragment:am[am.length-1]});return true;}}else{var al=document.querySelectorAll(l+".present .fragment.visible");
 if(al.length){al[al.length-1].classList.remove("visible");r("fragmenthidden",{fragment:al[al.length-1]});return true;}}return false;}function O(){clearTimeout(k);
-if(Y){k=setTimeout(x,Y);}}function B(){if(L()||Q()===false){a(m-1,0);}}function j(){if(L()||v()===false){a(m+1,0);}}function u(){if(L()||Q()===false){a(m,e-1);
-}}function F(){if(L()||v()===false){a(m,e+1);}}function Z(){if(Q()===false){if(g().up){u();}else{var al=document.querySelector(".reveal .slides>section.past:nth-child("+m+")");
+if(Y){k=setTimeout(x,Y);}}function B(){if(g().left&&(L()||Q()===false)){a(m-1,0);}}function j(){if(g().right&&(L()||v()===false)){a(m+1,0);}}function u(){if(g().up&&(L()||Q()===false)){a(m,e-1);
+}}function F(){if(g().down&&(L()||v()===false)){a(m,e+1);}}function Z(){if(Q()===false){if(g().up){u();}else{var al=document.querySelector(".reveal .slides>section.past:nth-child("+m+")");
 if(al){e=(al.querySelectorAll("section").length+1)||0;m--;a();}}}}function x(){if(v()===false){g().down?F():j();}O();}function ah(an){var am=document.activeElement;
 var ao=!!(document.activeElement&&(document.activeElement.type||document.activeElement.href||document.activeElement.contentEditable!=="inherit"));if(ao||an.shiftKey||an.altKey||an.ctrlKey||an.metaKey){return;
 }var al=true;switch(an.keyCode){case 80:case 33:Z();break;case 78:case 34:x();break;case 72:case 37:B();break;case 76:case 39:j();break;case 75:case 38:u();

PANIC: session(release): write data/sessions/b/3/b344615e43328f88: no space left on device

PANIC

session(release): write data/sessions/b/3/b344615e43328f88: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)