| <title>reveal.js - Test Grid</title> |
| <link rel="stylesheet" href="../dist/reveal.css"> |
| <link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css"> |
| <script src="../node_modules/qunit/qunit/qunit.js"></script> |
| <body style="overflow: auto;"> |
| <div id="qunit-fixture"></div> |
| <div class="reveal" style="display: none;"> |
| <script src="../dist/reveal.js"></script> |
| Reveal.initialize().then( () => { |
| QUnit.module( 'Grid Navigation' ); |
| QUnit.test( 'Disabled', function( assert ) { |
| assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined }, 'Correct starting point' ); |
| assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: undefined }, 'Moves to top when going to adjacent stack' ); |
| QUnit.test( 'Enabled', function( assert ) { |
| Reveal.configure({ navigationMode: 'grid' }); |
| assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined }, 'Correct starting point' ); |
| assert.deepEqual( Reveal.getIndices(), { h: 2, v: 2, f: undefined }, 'Remains at same vertical index when going to adjacent stack' ); |