[Commits] r343 - apps/opengeo/geoexplorer/trunk/lib

commits at geoext.org commits at geoext.org
Fri Apr 3 16:04:57 CEST 2009


Author: dwins
Date: 2009-04-03 16:04:57 +0200 (Fri, 03 Apr 2009)
New Revision: 343

Modified:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
Log:
Show superscripted 2 on units when measuring area


Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-04-02 23:39:55 UTC (rev 342)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-04-03 14:04:57 UTC (rev 343)
@@ -312,9 +312,12 @@
             var englishUnit = englishData[1];
             
             measureControl.displaySystem = "metric";
+            var dim = metricData.order == 2 
+                ? '<sup>2</sup>'
+                : '';
             
-            return metric.toFixed(2) + " " + metricUnit + "<br>" 
-                + english.toFixed(2) + " " + englishUnit;
+            return metric.toFixed(2) + " " + metricUnit + dim + "<br>" 
+                + english.toFixed(2) + " " + englishUnit + dim;
         }, this);
 
 



More information about the Commits mailing list