1
0
Fork 0

documentation for navigationMode #2307

This commit is contained in:
Hakim El Hattab 2019-01-23 10:14:40 +01:00
parent 51b1658a60
commit 2fa3ab6a6b
2 changed files with 13 additions and 17 deletions

View File

@ -285,10 +285,8 @@ Reveal.initialize({
// Change the presentation direction to be RTL
rtl: false,
// When this is enabled, stepping left/right from a vertical stack
// to an adjacent vertical stack will land you at the same vertical
// index instead of the top.
gridNavigation: false,
// .
navigationMode: 'default',
// Randomizes the order of slides each time the presentation loads
shuffle: false,
@ -523,14 +521,14 @@ Slides can be nested within other slides to create vertical stacks (see [Markup]
<img src="https://static.slid.es/support/reveal.js-vertical-slides.gif" width="450">
#### Grid Navigation
If you are on a vertical slide and step right onto an adjacent vertical stack, you'll arrive at the top of that stack. Consider a deck with six slides organized in two stacks like this:
```
1.1 2.1
1.2 2.2
1.3 2.3
```
If you're on slide 1.3 and navigate right, you will normally move from 1.3 -> 2.1. If you prefer remaining at the same vertical index and going directly from 1.3 -> 2.3 you can enable the `gridNavigation` config option: `Reveal.configure({ gridNavigation: true })`.
#### Navigation Mode
You can finetune the reveal.js navigation behavior by using the `navigationMode` config option. This option supports the following values:
| Value | Description |
| :--------------------------- | :---------- |
| default | Left/right arrow keys step between horizontal slides. Up/down arrow keys step between vertical slides. Space key steps through all slides (both horizontal and vertical). |
| linear | Removes the up/down arrows. Left/right arrows step through all slides (both horizontal and vertical). |
| grid | When this is enabled, stepping left/right from a vertical stack to an adjacent vertical stack will land you at the same vertical index.<br><br>Consider a deck with six slides ordered in two vertical stacks:<br>1.1 2.1<br>1.2 2.2<br>1.3 2.3<br><br>If you're on slide 1.3 and navigate right, you will normally move from 1.3 -> 2.1. With navigationMode set to "grid" the same navigation takes you from 1.3 -> 2.3. |
### Touch Navigation

View File

@ -116,10 +116,8 @@
// all slides (both horizontal and vertical).
//
// "linear"
// When this is enabled, the left/right arrow keys step through all
// slides (both horizontal and vertical) in a linear way. If the
// presentation has no vertical slides this setting is identical
// to "default".
// Removes the up/down arrows. Left/right arrows step through all
// slides (both horizontal and vertical).
//
// "grid"
// When this is enabled, stepping left/right from a vertical stack