error in selectEdgeOnClickHandler fixed

This commit is contained in:
Connor Turland 2014-06-11 11:05:04 -04:00
parent 5dd848abcf
commit ceb30ee5d6

View file

@ -31,25 +31,6 @@ function selectEdgeOnClickHandler(adj, e) {
selectEdge(adj);
}
var edgeIsSelected = MetamapsModel.selectedEdges.indexOf(adj);
if (edgeIsSelected == -1) edgeIsSelected = false;
else if (edgeIsSelected != -1) edgeIsSelected = true;
if (edgeIsSelected && e.shiftKey) {
//deselecting an edge with shift
deselectEdge(adj);
} else if (!edgeIsSelected && e.shiftKey) {
//selecting an edge with shift
selectEdge(adj);
} else if (edgeIsSelected && !e.shiftKey) {
//deselecting an edge without shift - unselect all
deselectAllEdges();
} else if (!edgeIsSelected && !e.shiftKey) {
//selecting an edge without shift - unselect all but new one
deselectAllEdges();
selectEdge(adj);
}
Mconsole.plot();
} //selectEdgeOnClickHandler