Index: trunk/FACT++/www/viewer/index.js
===================================================================
--- trunk/FACT++/www/viewer/index.js	(revision 17837)
+++ trunk/FACT++/www/viewer/index.js	(revision 17838)
@@ -426,5 +426,5 @@
     if (!item)
     {
-        $("#tooltip").fadeOut(100);
+        $("#tooltip").hide();//fadeOut(100);
         return;
     }
@@ -436,5 +436,5 @@
     tooltip.html(parseInt(x) + " / " + y);
     tooltip.css({top: item.pageY-20, left: item.pageX+5});
-    tooltip.fadeIn(200);
+    tooltip.show();//fadeIn(200);
 }
 
@@ -1525,5 +1525,8 @@
     var axis1 = yy;
     var axis2 = xx;
-    var ratio = xx/yy;
+
+    // Correction for scale in x
+    var f = Math.sqrt(3)/2; 
+    var ratio = xx/yy/f;
 
     if (d1!=0 || d2==0)
@@ -1539,7 +1542,13 @@
         sin = tand/s;
 
-        axis1 = (tand2*yy + d2 + xx)/s2;
-        axis2 = (tand2*xx - d2 + yy)/s2;
-        ratio = (tand2*xx - d2 + yy)/(tand2*yy + d2 + xx);
+        axis1 = (tand2*yy + d2 + xx);
+        axis2 = (tand2*xx - d2 + yy);
+
+        ratio = axis2/axis1;
+
+        axis1 /= s2;
+        axis2 /= s2;
+
+        ratio *= (f + tand*tand)/(tand*tand*f + 1);
     }
 
@@ -1547,4 +1556,5 @@
     var width  = axis2<0 ? 0 : Math.sqrt(axis2/sz);
 
+    //var r = (cos*cos*f + sin*sin)/(sin*sin*f + cos*cos);
     return {
         "mean":  [ mx/sz, my/sz ],
