arrow key panning - fixes #239
This commit is contained in:
parent
77d353464b
commit
ca981898d4
1 changed files with 12 additions and 0 deletions
|
@ -24,6 +24,18 @@ const Listeners = {
|
||||||
case 27: // if esc key is pressed
|
case 27: // if esc key is pressed
|
||||||
JIT.escKeyHandler()
|
JIT.escKeyHandler()
|
||||||
break
|
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
|
case 65: // if a or A is pressed
|
||||||
if (e.ctrlKey) {
|
if (e.ctrlKey) {
|
||||||
Control.deselectAllNodes()
|
Control.deselectAllNodes()
|
||||||
|
|
Loading…
Reference in a new issue