Opened 5 years ago

Closed 5 years ago

#2775 closed bug (fixed)

clear method should remove references to features

Reported by: tschaub Owned by: crschmidt
Priority: minor Milestone: 2.10 Release
Component: Renderer.Canvas Version: 2.9
Keywords: Cc:
State: Complete


With the elements renderers, you can call clear to effectively erase features from the renderer. With the canvas renderer, those features come back on the next draw.

Attachments (1)

2775.patch (911 bytes) - added by tschaub 5 years ago.
remove feature map

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by tschaub

remove feature map

comment:1 Changed 5 years ago by tschaub

  • State set to Review

An alternative if we don't like the duplicated line of code would be to add a "soft" arg to clear. Called with soft true, feature references would not be removed.

As is, tests pass (and clear permanently clears).

comment:2 Changed 5 years ago by crschmidt

  • State changed from Review to Commit

This looks fine to me. If the general meaning of clear() is 'get rid of and don't draw again until I tell you otherwise", the Canvas renderer is currently breaking that; fixing that makes sense. Code looks solid, and doesn't appear to break anything.

comment:3 Changed 5 years ago by tschaub

  • Resolution set to fixed
  • State changed from Commit to Complete
  • Status changed from new to closed

(In [10595]) Making it so the clear method on the canvas renderer permanently clears features (as with the other renderers). r=crschmidt (closes #2775)

Note: See TracTickets for help on using tickets.