mirror of
https://github.com/jxnblk/mdx-deck.git
synced 2024-11-29 05:46:00 +03:00
s/pg/page
This commit is contained in:
parent
69c60553ef
commit
73aa19d8f5
@ -4,6 +4,7 @@
|
||||
## Unreleased
|
||||
|
||||
- Changes styles to use `translate3d`
|
||||
- Add support for page up and page down keys
|
||||
|
||||
## v1.7.5 2018-09-22
|
||||
|
||||
|
@ -93,12 +93,12 @@ export class SlideDeck extends React.Component {
|
||||
} else if (shift) {
|
||||
switch (e.keyCode) {
|
||||
case keys.right:
|
||||
case keys.pgDown:
|
||||
case keys.pageDown:
|
||||
e.preventDefault()
|
||||
this.update(incrementIndex)
|
||||
break
|
||||
case keys.left:
|
||||
case keys.pgUp:
|
||||
case keys.pageUp:
|
||||
e.preventDefault()
|
||||
this.update(decrementIndex)
|
||||
break
|
||||
@ -106,13 +106,13 @@ export class SlideDeck extends React.Component {
|
||||
} else if (!alt && !shift) {
|
||||
switch (e.keyCode) {
|
||||
case keys.right:
|
||||
case keys.pgDown:
|
||||
case keys.pageDown:
|
||||
case keys.space:
|
||||
e.preventDefault()
|
||||
this.update(next)
|
||||
break
|
||||
case keys.left:
|
||||
case keys.pgUp:
|
||||
case keys.pageUp:
|
||||
e.preventDefault()
|
||||
this.update(previous)
|
||||
break
|
||||
|
@ -9,9 +9,9 @@ export const MDX_SLIDE_STEP = 'mdx-slide-step'
|
||||
|
||||
export const keys = {
|
||||
'right': 39,
|
||||
'pgDown': 34,
|
||||
'pageDown': 34,
|
||||
'left': 37,
|
||||
'pgUp': 33,
|
||||
'pageUp': 33,
|
||||
'space': 32,
|
||||
'p': 80,
|
||||
'o': 79,
|
||||
|
Loading…
Reference in New Issue
Block a user