[OpenLayers-Trac] Re: [OpenLayers] #2820: Measure: Using freehand, last measure is less than the correct measure .

OpenLayers trac-20090302 at openlayers.org
Tue Sep 28 17:54:46 EDT 2010


#2820: Measure: Using freehand, last measure is less than the correct measure .
-----------------------------+----------------------------------------------
 Reporter:  jorix            |       Owner:  tschaub     
     Type:  bug              |      Status:  new         
 Priority:  minor            |   Milestone:  2.11 Release
Component:  Control.Measure  |     Version:  2.10 RC2    
 Keywords:                   |       State:  Commit      
-----------------------------+----------------------------------------------
Changes (by tschaub):

  * state:  Review => Commit


Comment:

 Thanks for the patch jorix!

 The biggest problem is that we're not canceling the timeout at the
 appropriate places.  In addition, we only need to trigger
 {{{measurepartial}}} after some delay when we're expecting a double-click.
 When in freehand mode, we can trigger events synchronously.

 I've simplified the patch by just addressing these two things:
  * {{{cancelDelay}}} method added and called when measure is complete,
 when control is deactivated, and when measure is canceled
  * when in freehand mode, the {{{measurepartial}}} event is fired with no
 delay

 The tests are updated to demonstrate how {{{measurepartial}}} and
 {{{measure}}} are only fired at the appropriate times whether in freehand
 mode or not.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2820#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list