[OpenLayers-Trac] Re: [OpenLayers] #2935: measure control should be
able to calculate immediately while mouse is moving
OpenLayers
trac-20090302 at openlayers.org
Mon Nov 22 11:28:03 EST 2010
#2935: measure control should be able to calculate immediately while mouse is
moving
-----------------------------+----------------------------------------------
Reporter: patzi | Owner: tschaub
Type: feature | Status: new
Priority: minor | Milestone: 2.11 Release
Component: Control.Measure | Version: 2.10
Keywords: | State:
-----------------------------+----------------------------------------------
Comment(by patzi):
Replying to [comment:4 ahocevar]:
I added a new patch including tests
> A few things:
> * Cloning the geometry is relatively expensive, and not needed here. It
was added for measurepartial to make sure you get the correct measurement
even if you move the mouse very fast and the geometry has changed after
"measurepartial" but before you use the measurement result.
fixed.
> * You should register the modify callback only if the control was
configured with {{{immediate}}} set to {{{true}}}, because even calling a
callback that does nothing causes an overhead while moving the mouse.
fixed
> * To avoid two "measurepartial" events being fired in freehand mode, It
would be cheaper to check for {{{immediate}}} in measurePartial than to
check for freehand mode in measureImmediate.
fixed
> * I think this patch would break what was fixed with r10799. So you
have to make sure that measureImmediate only causes a "measurepartial"
event to be fired when {{{delayedTrigger}}} is null.
I think this should not happen, but I must consist that I do not
completely understand when this error could arise.
--
Ticket URL: <http://trac.openlayers.org/ticket/2935#comment:6>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list