[fusion-commits] r2431 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Sep 26 12:17:34 EDT 2011
Author: jng
Date: 2011-09-26 09:17:34 -0700 (Mon, 26 Sep 2011)
New Revision: 2431
Modified:
trunk/widgets/Measure.js
Log:
Measure widget: Add a small guard to prevent error log spam
Modified: trunk/widgets/Measure.js
===================================================================
--- trunk/widgets/Measure.js 2011-09-26 16:10:16 UTC (rev 2430)
+++ trunk/widgets/Measure.js 2011-09-26 16:17:34 UTC (rev 2431)
@@ -610,13 +610,15 @@
}
if (this.measureType & Fusion.Constant.MEASURE_TYPE_AREA) {
var tArea = outputDoc.getElementById('totalArea');
- value = this.areaMarker.getQuantity();
- if (this.areaPrecision == 0) {
- value = Math.floor(value);
- } else {
- value = value.toPrecision(this.areaPrecision);
+ if (tArea) {
+ value = this.areaMarker.getQuantity();
+ if (this.areaPrecision == 0) {
+ value = Math.floor(value);
+ } else {
+ value = value.toPrecision(this.areaPrecision);
+ }
+ tArea.innerHTML = value + ' ' + units + '<sup>2</sup>';
}
- tArea.innerHTML = value + ' ' + units + '<sup>2</sup>';
}
},
More information about the fusion-commits
mailing list