[fusion-commits] r2282 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Nov 19 11:54:00 EST 2010
Author: madair
Date: 2010-11-19 08:54:00 -0800 (Fri, 19 Nov 2010)
New Revision: 2282
Modified:
trunk/widgets/Measure.js
Log:
re ofsc #70: add in last marker to total distance but only for areas
Modified: trunk/widgets/Measure.js
===================================================================
--- trunk/widgets/Measure.js 2010-11-19 16:47:54 UTC (rev 2281)
+++ trunk/widgets/Measure.js 2010-11-19 16:54:00 UTC (rev 2282)
@@ -601,14 +601,13 @@
* updates the summary display if it is loaded in a window somewhere
*/
updateTotalDistance: function() {
+ var totalDistance = this.lastMarker.getQuantity();
if (this.distanceMarkers.length > 1) {
- var totalDistance = 0;
var units = Fusion.unitAbbr(this.units);
for (var i=0; i<this.distanceMarkers.length; i++) {
var distance = this.distanceMarkers[i].getQuantity();
totalDistance += distance;
}
- totalDistance += this.lastMarker.getQuantity();
this.totalDistanceMarker.domObj.style.display = 'block';
this.totalDistanceMarker.setQuantity(totalDistance);
More information about the fusion-commits
mailing list