Index: draw.html
==================================================================
--- draw.html
+++ draw.html
@@ -92,17 +92,10 @@
var view_transform =
[[1, 0, 0],
[0, 1, 0],
[0, 0, 1]];
-
-
-
-
-
-
-
var key_state = {};
var key_state_augmentation_timeout = 150; // the permissible time in milliseconds since the last key event to still allow the key state to augment instead of clearing.
@@ -339,11 +332,11 @@
alreadySelected = true;
break; }}}
else{
selected_points.length = 0;}
- if(!alreadySelected) selected_points.push(highlight_object); }
+ if(!alreadySelected && highlight_object < points.length) selected_points.push(highlight_object); }
else if(!key_state[16] || !key_state[16].state)
selected_points.length = 0; }
Index: matrix_vector_lib.js
==================================================================
--- matrix_vector_lib.js
+++ matrix_vector_lib.js
@@ -258,11 +258,11 @@
// http://inside.mines.edu/~gmurray/ArbitraryAxisRotation/ArbitraryAxisRotation.html
// creates a rotation matrix about the given vector.
//
function vector_rotation(vector, s){
if(!vector) throw "vector argument to vector_rotation missing";
- if(!s) throw "angle argument to vector_rotation missing";
+ if(s === null || s === undefined) throw "angle argument to vector_rotation missing";
var len = Math.sqrt(vector[0]*vector[0]
+ vector[1]*vector[1]
+ vector[2]*vector[2]);