[OpenLayers-Trac] Re: [OpenLayers] #2935: measure control should be able to calculate immediately while mouse is moving

OpenLayers trac-20090302 at openlayers.org
Wed Nov 24 05:43:13 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:  Commit      
-----------------------------+----------------------------------------------
Changes (by ahocevar):

  * state:  Review => Commit


Comment:

 I uploaded a new patch with two minor changes:

 Replying to [comment:4 ahocevar]:
 >  * 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.

 My patch does what patzi's original patch did: check for freehand mode in
 {{{measureImmediate}}}. Otherwise the logic for taking into account the
 {{{delayedTrigger}}} (see below) would be a bit awkward.

 >  * 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.

 My patch takes care of this by checking for {{{delayedTrigger}}} in
 {{{measureImmediate}}}.

 The tests were updated accordingly.

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


More information about the Trac mailing list