don't fire measurepartial on first click. r=elemoine (closes #2096)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10406 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2010-06-17 11:59:37 +00:00
parent cca1395fc6
commit cd94a7f17d

View File

@@ -179,12 +179,14 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, {
* geometry - {<OpenLayers.Geometry>} The sketch geometry. * geometry - {<OpenLayers.Geometry>} The sketch geometry.
*/ */
measurePartial: function(point, geometry) { measurePartial: function(point, geometry) {
this.delayedTrigger = window.setTimeout( if (geometry.getLength() > 0) {
OpenLayers.Function.bind(function() { this.delayedTrigger = window.setTimeout(
this.measure(geometry, "measurepartial"); OpenLayers.Function.bind(function() {
}, this), this.measure(geometry, "measurepartial");
this.partialDelay }, this),
); this.partialDelay
);
}
}, },
/** /**