OpenLayers OpenLayers

Ticket #1833 (closed feature: fixed)

Opened 1 year ago

Last modified 1 year ago

draw and modify controls should set feature state

Reported by: tschaub Assigned to:
Priority: minor Milestone: 2.8 Release
Component: Control.DrawFeature Version: 2.7
Keywords: Cc:
State: Complete

Attachments

state.patch (6.7 kB) - added by tschaub on 11/14/08 11:35:32.
set feature state while modifying and drawing

Change History

11/13/08 18:52:10 changed by tschaub

  • state set to Review.

This is part of #1648. Tests pass. Please review.

(follow-up: ↓ 3 ) 11/14/08 02:53:19 changed by elemoine

I think the editing toolbar should be updated not to set OpenLayers.State.INSERT itself.

(in reply to: ↑ 2 ) 11/14/08 10:16:08 changed by tschaub

Replying to elemoine:

I think the editing toolbar should be updated not to set OpenLayers.State.INSERT itself.

Good point. Updated patch removes redundant state setting from the editing panel and any examples.

Tests pass (with the exception of BaseTypes/Element, Control/KeyboardDefaults, and Control/ScaleLine - these fail for unrelated reasons and I'll try to fix them now).

11/14/08 10:22:07 changed by tschaub

With r8356 BaseTypes/Element passes for me again. The others pass when run in isolation.

11/14/08 10:55:37 changed by elemoine

  • state changed from Review to Commit.

Thanks for updating the examples and addint the state != OpenLayers.State.DELETE check. This is looking good. Please commit.

(follow-up: ↓ 7 ) 11/14/08 11:26:43 changed by ahocevar

  • state changed from Commit to Needs More Work.

tschaub: Wait! The code you have added dragComplete() should also be in handleKeypress. Because the feature will also be modified if we remove a vertex!

11/14/08 11:35:32 changed by tschaub

  • attachment state.patch added.

set feature state while modifying and drawing

(in reply to: ↑ 6 ) 11/14/08 11:37:01 changed by tschaub

Replying to ahocevar:

tschaub: Wait! The code you have added dragComplete() should also be in handleKeypress. Because the feature will also be modified if we remove a vertex!

Nice catch. New patch handles this (and tests for it).

11/14/08 12:53:30 changed by ahocevar

  • state changed from Needs More Work to Commit.

Looks good now! Please commit.

11/16/08 12:26:39 changed by tschaub

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

(In [8382]) Draw and modify controls now set feature state. No longer do we need to check feature state in app code in cases where features are created or modified with these controls. r=elemoine,ahocevar (closes #1833)