Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

76 linhas
1.8 KiB

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Test Grid</title>
  6. <link rel="stylesheet" href="../dist/reveal.css">
  7. <link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
  8. <script src="../node_modules/qunit/qunit/qunit.js"></script>
  9. </head>
  10. <body style="overflow: auto;">
  11. <div id="qunit"></div>
  12. <div id="qunit-fixture"></div>
  13. <div class="reveal" style="display: none;">
  14. <div class="slides">
  15. <section>0</section>
  16. <section>
  17. <section>1.1</section>
  18. <section>1.2</section>
  19. <section>1.3</section>
  20. <section>1.4</section>
  21. </section>
  22. <section>
  23. <section>2.1</section>
  24. <section>2.2</section>
  25. <section>2.3</section>
  26. <section>2.4</section>
  27. </section>
  28. </div>
  29. </div>
  30. <script src="../dist/reveal.js"></script>
  31. <script>
  32. QUnit.config.testTimeout = 30000;
  33. QUnit.config.autostart = false;
  34. QUnit.module( 'Grid Navigation' );
  35. Reveal.initialize().then( () => {
  36. QUnit.start();
  37. QUnit.test( 'Disabled', function( assert ) {
  38. Reveal.right();
  39. Reveal.down();
  40. Reveal.down();
  41. assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined }, 'Correct starting point' );
  42. Reveal.right();
  43. assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: undefined }, 'Moves to top when going to adjacent stack' );
  44. });
  45. QUnit.test( 'Enabled', function( assert ) {
  46. Reveal.configure({ navigationMode: 'grid' });
  47. Reveal.slide( 0, 0 );
  48. Reveal.right();
  49. Reveal.down();
  50. Reveal.down();
  51. assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined }, 'Correct starting point' );
  52. Reveal.right();
  53. assert.deepEqual( Reveal.getIndices(), { h: 2, v: 2, f: undefined }, 'Remains at same vertical index when going to adjacent stack' );
  54. });
  55. } );
  56. </script>
  57. </body>
  58. </html>