mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
up and down arrows for movement
This commit is contained in:
@@ -213,10 +213,12 @@ class Dashboard extends React.Component {
|
||||
const idx = this.findEventIdx(ev)
|
||||
switch (e.keyCode) {
|
||||
case 37: // left arrow
|
||||
case 38: // up arrow
|
||||
if (idx <= 0) return
|
||||
prev(idx)
|
||||
break
|
||||
case 39: // right arrow
|
||||
case 40: // down arrow
|
||||
if (idx < 0 || idx >= this.props.domain.length - 1) return
|
||||
next(idx)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user