OpenLayers OpenLayers

Ticket #561 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

SelectFeature control should have onselect and onunselect methods

Reported by: tschaub Assigned to: tschaub
Priority: minor Milestone: 2.4 Release
Component: general Version:
Keywords: Cc:
State:

Description

The following patch lets users of the SelectFeature control set optional onselect and onunselect properties. These are functions that get called with the selected or unselected geometry. This keeps control users from having to dive in and mess with the callbacks that the feature handler uses.

The control code can also use a bit of refactoring - pulling out the select and onselect functionality.

Attachments

refactor.patch (4.9 kB) - added by tschaub on 03/25/07 14:04:23.
gives the control onselect and onunselect properties

Change History

03/25/07 14:04:23 changed by tschaub

  • attachment refactor.patch added.

gives the control onselect and onunselect properties

03/25/07 14:05:25 changed by tschaub

  • keywords set to review.

I'll gladly commit if reviewed.

03/25/07 21:08:23 changed by crschmidt

  • keywords changed from review to commit.

Tim:

I'm happy with this. The refactoring doesn't hurt anything, and it moves the crappy code I wrote out in a way that's much cleaner. (I didn't like it when I wrote it but didn't think of seperating them out to seperate functions.)

Commit when you're ready.

03/25/07 23:38:37 changed by tschaub

  • keywords deleted.
  • status changed from new to closed.
  • resolution set to fixed.

committed with r2895 - I decided on onSelect and onUnselect instead of onselect and onunselect