[OpenLayers-Trac] Re: [OpenLayers] #3319: Handler.Path: Problem with "modify" callback in drawing parameter.

OpenLayers trac-20090302 at openlayers.org
Sat Aug 13 12:50:55 EDT 2011


#3319: Handler.Path: Problem with "modify" callback in drawing parameter.
--------------------------+-------------------------------------------------
 Reporter:  jorix         |       Owner:  tschaub     
     Type:  bug           |      Status:  new         
 Priority:  trivial       |   Milestone:  2.11 Release
Component:  Handler.Path  |     Version:  2.11 RC1    
 Keywords:                |       State:  Review      
--------------------------+-------------------------------------------------
Changes (by jorix):

  * state:  => Review
  * milestone:  2.12 Release => 2.11 Release


Comment:

 I've looked again this topic:

 There is an added difficulty: The use of third argument of {{{modify}}}
 callback isn't described in the documentation (also not mentioned in the
 release notes)

 I think interesting to add such documentation in 2.11, since it is an
 improvement that avoids having to use {{{drawing}}} property of the
 handler (which has disappeared in 2.11)

 When {{{addPoint}}} I have retained the {{{undefined}}} value for
 {{{drawing}}} argument, it is more pactice see use in
 {{{Control/Measure.js}}}.

 To fix the bug, I propose two alternatives:
  * A: use the {{{drawing}}} property reintroduced (only for internal use)
  * B: use the new {{{getCurrentPointIndex}}} function (I think it will
 cost a bit more)

 In the two options are added detailed documentation and tests of
 {{{drawing}}} argument of {{{modify}}} callback (only three of new tests
 fail using the trunk)

 NOTE: I have not touched the line {{{480}}} of {{{Handler/Path.js}}} but I
 think it should be {{{this.modifyFeature(evt.xy, !!this.lastUp);}}} I have
 not changed because currently does not cause problems (that I know)

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


More information about the Trac mailing list