Ticket #2755 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

"temporary" sketch style from Vector layer does not get applied to OpenLayers.Handler.RegularPolygon

Reported by: zanchin Owned by: ahocevar
Priority: major Milestone: 2.10 Release
Component: Handler.RegularPolygon Version: SVN
Keywords: Cc: zanchin
State: Complete

Description

If a custom "temporary" sketch style is specified in a styleMap that is given to a Vector layer, none of the RegularPolygon sketches use that style. However, the Point handler does the right thing and uses the temporary style during sketching.

Currently (as of SVN 10517), the activate method of OpenLayers.Handler.RegularPolygon drops options.layerOptions that is passed into the constructor. The fix in the patch below makes the RegularPolygon handler work the same as the Point handler in this case.

Namely, it:

  1. Doesn't set this.style if a styleMap is specified in layerOptions
  2. Passes through layerOptions to the temporary Vector layer in activate()

Attachments

regularpolygon.patch Download (1.6 KB) - added by zanchin 3 years ago.
proposed fix
openlayers-2755.patch Download (2.2 KB) - added by ahocevar 3 years ago.
Same as above, but with APIdocs and declaration for layerOptions

Change History

Changed 3 years ago by zanchin

proposed fix

Changed 3 years ago by ahocevar

Same as above, but with APIdocs and declaration for layerOptions

Changed 3 years ago by ahocevar

  • state changed from Review to Commit

@zanchin: Very nice fix. I can confirm that tests still pass. Can you please follow these instructions and send a CLA? I can commit your fix as soon as you have added a comment to this ticket that the CLA was sent.

Changed 3 years ago by zanchin

appologies for the delay - the ICLA has been mailed (the fax number did not answer).

Changed 3 years ago by ahocevar

  • owner changed from tschaub to ahocevar
  • status changed from new to assigned

Changed 3 years ago by ahocevar

  • status changed from assigned to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [10645]) Give ReglarPolygon handler a layerOptions config option. p=zanchin, r=me (closes #2755)

Note: See TracTickets for help on using tickets.