[OpenLayers-Dev] There are two bugs in Control.Measure.

Tim Schaub tschaub at opengeo.org
Tue Sep 28 18:03:58 EDT 2010


On 9/23/10 3:20 PM, Xavier Mamano (jorix) wrote:
>
> Hi list,
>
> The problems are:
>
> 1.- The last measure can be a "measurepartial" and less that the correct
> measure.
> 2.- Measuring and immediately turns off the control, a "measurepartial" can
> be triggered after the control is deactivated.
>

Thanks for the patch Xavier.

The workaround for IE with partialDelay is only relevant when we're 
waiting for a double-click.  When in freehand mode, we can fire the 
measurepartial event synchronously.

Your addition of the cancelDelay method (and calling it from 
measureComplete, cancel, and deactivate) is the key to fixing the rest 
of the weird behavior.

I simplified the patch a bit to keep the cancelDelay functionality and 
then only fire measurepartial asynchronously when not in freehand mode. 
  This is in with r10799.  See the tests for expected behavior.  Let me 
know if this doesn't match your expectations.

Tim


> I opened the ticket http://trac.osgeo.org/openlayers/ticket/2820 with 2.10
> RC2. Now that the release 2.10 is closed I will again mention the problem
> thinking 2.11.
>
> The ticket contains a test and a patch.


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.


More information about the Dev mailing list