esc deselects all nodes/synapses

This commit is contained in:
Devin Howard 2013-03-28 18:56:34 -04:00
parent 3f0e94297b
commit 1f096cf5a5
2 changed files with 9 additions and 2 deletions

View file

@ -42,6 +42,11 @@ function enterKeyHandler() {
Mconsole.plot(); Mconsole.plot();
}//enterKeyHandler }//enterKeyHandler
function escKeyHandler() {
deselectAllEdges();
deselectAllNodes();
}//escKeyHandler
function keepFromCommons(node) { function keepFromCommons(node) {
if (userid == null) { if (userid == null) {
return; return;

View file

@ -302,7 +302,9 @@ function MconsoleReset() {
} }
$('*').keypress(function(e) { $('*').keypress(function(e) {
if (e.which == 13) { switch(e.which) {
enterKeyHandler(); case 13: enterKeyHandler(); break;
case 27: escKeyHandler(); break;
default: //alert(e.which); break;
} }
}); });