Index: /issm/trunk-jpl/src/m/plot/webgl.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/webgl.js	(revision 19915)
+++ /issm/trunk-jpl/src/m/plot/webgl.js	(revision 19916)
@@ -122,4 +122,5 @@
 } //}}}
 function recalculateModelMatrix(node) { //{{{
+	//TODO: move to 0,0,0, rotate,move back to normal space, then apply transform
 	var modelMatrix = mat4.create();
 
@@ -128,4 +129,8 @@
 	mat4.multiply(modelMatrix, scaleMatrix, modelMatrix);
 
+	var translationMatrix = mat4.create();
+	mat4.translate(translationMatrix, translationMatrix, node["translation"]); //relative translation
+	mat4.multiply(modelMatrix, translationMatrix, modelMatrix);
+	
 	var zRotationMatrix = mat4.create();	
 	mat4.rotate(zRotationMatrix, zRotationMatrix, node["rotation"][2] * Math.PI/180.0, [0.0, 0.0, 1.0]);
@@ -137,8 +142,4 @@
 	mat4.rotate(xRotationMatrix, xRotationMatrix, node["rotation"][0] * Math.PI/180.0, [1.0, 0.0, 0.0]);
 	mat4.multiply(modelMatrix, xRotationMatrix, modelMatrix);
-
-	var translationMatrix = mat4.create();
-	mat4.translate(translationMatrix, translationMatrix, node["translation"]); //relative translation
-	mat4.multiply(modelMatrix, translationMatrix, modelMatrix);
 
 	return modelMatrix;
