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();
}//enterKeyHandler
function escKeyHandler() {
deselectAllEdges();
deselectAllNodes();
}//escKeyHandler
function keepFromCommons(node) {
if (userid == null) {
return;

View file

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