OpenLayers OpenLayers

Ticket #1427 (closed feature: fixed)

Opened 6 months ago

Last modified 1 month ago

The beforefeaturemodified event should be triggered before vertices get rendered

Reported by: tschaub Assigned to: tschaub
Priority: critical Milestone: 2.7 Release
Component: Control.ModifyFeature Version: 2.5
Keywords: Cc:
State: Complete

Description

In order to let listeners decide what to do before modification begins, the beforefeaturemodified event should get triggered before vertices get rendered. In addition, we should respect the return. As with other listeners, you should be able to return false to stop execution.

Attachments

beforefeaturemodified.patch (1.0 kB) - added by tschaub on 03/11/08 12:07:08.
trigger before action
patch-1427-r7159-A0.diff (1.0 kB) - added by elemoine on 05/13/08 16:00:12.
patch-1427-r7546-A1.diff (3.2 kB) - added by elemoine on 07/21/08 04:58:45.
t1427.patch (10.5 kB) - added by tschaub on 07/30/08 11:06:39.
feature select and modify events

Change History

03/11/08 12:07:08 changed by tschaub

  • attachment beforefeaturemodified.patch added.

trigger before action

03/31/08 02:53:40 changed by crschmidt

  • state set to Review.

Looks like this is okay to review? Change back if otherwise.

05/13/08 15:57:48 changed by elemoine

this patch is wrong because this.feature isn't properly set when beforefeaturemodified is triggered. proper patch to come...

05/13/08 16:00:12 changed by elemoine

  • attachment patch-1427-r7159-A0.diff added.

05/13/08 16:09:34 changed by elemoine

with patch-1427-r7159-A0.diff applied, all unit tests pass on FF2, please review

07/18/08 14:44:22 changed by crschmidt

Can we cook up a quick test for this? I can try if no one else cares.

07/21/08 04:58:45 changed by elemoine

  • attachment patch-1427-r7546-A1.diff added.

07/21/08 05:04:30 changed by elemoine

See patch-1427-r7546-A1.diff. Except, Layer/MultiMap.html, all unit tests pass on FF2 and FF3.

07/28/08 15:16:29 changed by euzuro

  • priority changed from minor to critical.

07/29/08 23:15:32 changed by tschaub

In order to avoid having the feature selected at all, I added a beforefeatureselected event. The modify feature control listens to this and triggers beforefeaturemodified. If the listener returns false, the feature is not selected or modified.

07/30/08 10:49:19 changed by euzuro

  • owner changed from tschaub to ahocevar.

07/30/08 11:06:39 changed by tschaub

  • attachment t1427.patch added.

feature select and modify events

07/30/08 16:23:18 changed by elemoine

This is looking good. Please commit.

07/30/08 17:58:20 changed by ahocevar

  • owner changed from ahocevar to tschaub.
  • state changed from Review to Commit.

Yes, this is really looking good. If tests pass, please go ahead and commit.

07/30/08 18:03:40 changed by tschaub

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

(In [7616]) Adding a beforefeatureselected event to the vector layer events. If a listener returns false, the feature is not selected. The modify feature control now listens for beforefeatureselected and triggers beforefeaturemodified. If a listener returns false, feature modification never begins. r=elemione,ahocevar (closes #1427)