documentation for navigationMode #2307
This commit is contained in:
parent
51b1658a60
commit
2fa3ab6a6b
2 changed files with 13 additions and 17 deletions
22
README.md
22
README.md
|
@ -285,10 +285,8 @@ Reveal.initialize({
|
||||||
// Change the presentation direction to be RTL
|
// Change the presentation direction to be RTL
|
||||||
rtl: false,
|
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
|
navigationMode: 'default',
|
||||||
// index instead of the top.
|
|
||||||
gridNavigation: false,
|
|
||||||
|
|
||||||
// Randomizes the order of slides each time the presentation loads
|
// Randomizes the order of slides each time the presentation loads
|
||||||
shuffle: false,
|
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">
|
<img src="https://static.slid.es/support/reveal.js-vertical-slides.gif" width="450">
|
||||||
|
|
||||||
#### Grid Navigation
|
#### Navigation Mode
|
||||||
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:
|
You can finetune the reveal.js navigation behavior by using the `navigationMode` config option. This option supports the following values:
|
||||||
```
|
|
||||||
1.1 2.1
|
| Value | Description |
|
||||||
1.2 2.2
|
| :--------------------------- | :---------- |
|
||||||
1.3 2.3
|
| 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). |
|
||||||
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 })`.
|
| 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
|
### Touch Navigation
|
||||||
|
|
||||||
|
|
|
@ -116,10 +116,8 @@
|
||||||
// all slides (both horizontal and vertical).
|
// all slides (both horizontal and vertical).
|
||||||
//
|
//
|
||||||
// "linear"
|
// "linear"
|
||||||
// When this is enabled, the left/right arrow keys step through all
|
// Removes the up/down arrows. Left/right arrows step through all
|
||||||
// slides (both horizontal and vertical) in a linear way. If the
|
// slides (both horizontal and vertical).
|
||||||
// presentation has no vertical slides this setting is identical
|
|
||||||
// to "default".
|
|
||||||
//
|
//
|
||||||
// "grid"
|
// "grid"
|
||||||
// When this is enabled, stepping left/right from a vertical stack
|
// When this is enabled, stepping left/right from a vertical stack
|
||||||
|
|
Loading…
Reference in a new issue