Ticket #2199 (closed feature: fixed)

Opened 4 years ago

Last modified 4 years ago

Introduce standalone mode for ModifyFeature control

Reported by: ahocevar Owned by:
Priority: minor Milestone: 2.9 Release
Component: general Version: 2.8
Keywords: Cc:
State: Complete

Description

In some configurations, the selectControl integrated in Control.ModifyFeature may be undesired. Instead, someone might just want to start mofifying a feature by saying

modifyControl.selectFeature(feature);

Attached is a patch which introduces a standalone property. If set, no selectControl will be created.

Attachments

modify-standalone.patch Download (5.1 KB) - added by ahocevar 4 years ago.
standalone property for the ModifyFeature control
2199.patch Download (8.3 KB) - added by tschaub 4 years ago.
standalone mode for modify feature control

Change History

Changed 4 years ago by ahocevar

standalone property for the ModifyFeature control

Changed 4 years ago by tschaub

  • state set to Commit

This is nice. I added a bit in the deactivate method so that unselectFeature is called if a feature is currently being modified. This is effectively what happens in the non-standalone mode (when the selectFeature control is deactivated). Though an app developer may be able to manually call selectFeature and unselectFeature to start and stop feature modification - I think it is important that the control cleans up after itself on deactivation (and the app developer may not be able to intervene here.)

The tests demonstrate what happens. There is currently no "beforefeaturemodified" event triggered. It may make sense to trigger this (and respect the return) in selectFeature in standalone mode (so feature modification can be stopped at the application level).

Andreas, if you agree the change I made is good, please commit. I confirmed that tests pass in FF3 - didn't check IE.

Changed 4 years ago by tschaub

standalone mode for modify feature control

Changed 4 years ago by ahocevar

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed
Note: See TracTickets for help on using tickets.