Merge pull request #699 from metamaps/feature/arrow-keys-pan
arrow key panning - fixes #239
This commit is contained in:
commit
05c1e4c60d
1 changed files with 12 additions and 0 deletions
|
@ -24,6 +24,18 @@ const Listeners = {
|
|||
case 27: // if esc key is pressed
|
||||
JIT.escKeyHandler()
|
||||
break
|
||||
case 37: // if Left arrow key is pressed
|
||||
Visualize.mGraph.canvas.translate(-20, 0)
|
||||
break
|
||||
case 38: // if Up arrow key is pressed
|
||||
Visualize.mGraph.canvas.translate(0, -20)
|
||||
break
|
||||
case 39: // if Right arrow key is pressed
|
||||
Visualize.mGraph.canvas.translate(20, 0)
|
||||
break
|
||||
case 40: // if Down arrow key is pressed
|
||||
Visualize.mGraph.canvas.translate(0, 20)
|
||||
break
|
||||
case 65: // if a or A is pressed
|
||||
if (e.ctrlKey) {
|
||||
Control.deselectAllNodes()
|
||||
|
|
Loading…
Reference in a new issue