Commit Graph

25 Commits

Author SHA1 Message Date
Tim Schaub
6897c8ed4d 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)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7616 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-07-30 22:03:40 +00:00
Éric Lemoine
c2c23cb3f3 modify feature control must use silent:true when removing/destroying vertices, p=me, r=crschmidt (closes #1562)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7614 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-07-30 20:26:13 +00:00
Éric Lemoine
34ff282397 ND changes in the modify feature control. Thanks ahocevar for catching the erroneous comment in handleKeypress. No fonctional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7213 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-05-17 20:11:45 +00:00
Éric Lemoine
9190e24bcd Cannot modify a feature (linestring) that have two points at the same position, r=me, thanks pvalsecc for the patch and the detailed justification of this patch. (closes #1533)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7061 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-05-05 06:55:07 +00:00
Tim Schaub
209f8f68f8 Fixing links in documentation. Other Natural Docs changes. (closes #1504)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6833 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-09 16:52:08 +00:00
ahocevar
7251cb438f fixed typo: replaced styleVirtual with virtualStyle, so it matches the API property. r=crschmidt (pullup #1495)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6802 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-07 08:07:25 +00:00
Paul Spencer
d15ab68360 quick lint before rc1, only some missing missing semi-colons.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6748 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-01 00:14:34 +00:00
Tim Schaub
6d59830d0e Documenting onModification* methods as deprecated in ModifyFeature control.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6490 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-11 16:02:39 +00:00
Frédéric Junod
8b91ee8d64 Send events when modifying features:
'beforefeaturemodified' triggered when a feature is selected to be modified,
  'featuremodified' triggered when a feature has been modified,
  'afterfeaturemodified' triggered when a feature is finished being modified

r=tschaub (Closes #1358)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6413 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 06:50:39 +00:00
pgiraud
10ee48c84c fixes typo (Closes #1365)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6315 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-16 08:20:49 +00:00
ahocevar
c5dd8ada2c "users should be able to customize the select style per feature": Created a !StyleMap class which stores all styles that are needed for a layer. Controls that need to render features differently can now just give a render intent (e.g. "default", "select" or "temporary") to the layer's drawFeature method, instead of having extra style informations like Control.!SelectFeature.selectStyle. Existing application that set layer.style or feature.style are still supported, but both of these style properties are now null by default. r=crschmidt,elemoine,tschaub (closes #1120)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6240 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-12 23:05:47 +00:00
Tim Schaub
f27833f1db Trigger feature related events with feature information and layer related events with layer information. Also adding events.on and events.un convenience methods. r=crschmidt (closes #1343)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6149 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 23:31:27 +00:00
Tim Schaub
49e0bff93d For controls with multiple handlers, we now tack them on to a handlers object. The base destroy takes care of the handlers. r=crschmidt,uz/2 (closes #1338)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6106 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 15:52:03 +00:00
Éric Lemoine
3acc19ae3d The modify feature control destroys the vertex that was dragged in the drag
complete callback. Thus, the drag feature control won't detect a mouse-out on
that vertex and won't deactivate its drag handler. This causes errors because
the drag feature control has a feature to drag but that feature is destroyed
(feature.geometry is null). To prevent this, we make resetVertices explicitely
call outFeature on the drag feature control if the control has a feature to
drag. tschaub did most of the investigation on the problem. r=tschaub,me
(closes #1235)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5974 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-03 17:10:03 +00:00
Éric Lemoine
a68492e003 The deactivate method of the modify feature control calls the unselect method
of its select feature control and passes it the current selected feature (if
any). If that selected feature is destroyed between the time it was selected
and the time the modify feature control is deactivated, the unselect method of
the select feature control will attempt to draw it on the layer while it no
longer has a geometry (it's destroyed!). This patch prevents this from
happening. Thanks to tlpinney for reporting the bug and helping on its
evaluation. r=tschaub (closes #1281) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5897 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-25 23:18:20 +00:00
Tim Schaub
d643492888 Proper handling of virtual vertices so we don't leave them on the layer. r=crschmidt (closes #1230)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5623 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-02 18:54:33 +00:00
Tim Schaub
33e313b059 Separating jsdoc style docs into their own block. The new NaturalDocs doesn't parse these mixed blocks, giving us no class descriptions with the two together. (closes #1229)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5553 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-21 08:28:09 +00:00
Éric Lemoine
6fb48c0cd7 Enables unselecting selected features by clicking outside any feature. This is the default mode of the modify feature control. If you want to use the old mode where a click on a selected feature unselects that feature, set the toggle option to true. If you really want the old mode and not have selected features be unselected when clicking outside any feature, set the clickout option to false. The patch also adds the properties toggleKey and multipleKey to the modify feature control. With these one can temporarily enable the toggle and multiple mode, respectively. See the select-feature.html example to see all this in action. Thanks to pvalsecc and tschaub for the great colloration on this. (closes #1137)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5506 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 11:09:44 +00:00
Éric Lemoine
dc2cc625f3 Do not call preFeatureInsert() and onFeatureInsert() callbacks when the modify feature control and the regular polygon handler internally adds point geometries to the layer. This is accomplished by adding an 'options' argument to the addFeatures() method in Layer.Vector. If that options argument has the silent property set to true, then the preFeatureInsert() and onFeatureInsert() callbacks aren't called. Thanks tschaub and fredj for your input. Thanks crschmidt for the final review. (closes #1148)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5470 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 14:36:39 +00:00
Éric Lemoine
175c401e0f ModifyFeature: enable dragging without enabling vertex modifications. Special thanks to tschaub for the collaboration on all the changes to the modify feature control. And thanks to crschmidt for the review. (closes #1188)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5467 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 10:12:56 +00:00
Tim Schaub
10cf5bfefc drag, rotate, resize, and reshape with the ModifyFeature control - thanks pvalsecc and elemoine for the inspiration, tests, and code - good partenering with you guys (closes #1150).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5301 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-30 17:09:23 +00:00
Tim Schaub
8007298d7b Dissalow vertex deletion while dragging - thanks for the review crschmidt (closes #1122).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5099 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-01 23:06:10 +00:00
crschmidt
ed3221441c Refactor SVN layout in compliance with RFC/LicenseChange. This hopefully
completes an important blocker for moving forward with OSGeo incubation. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4985 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-17 02:21:22 +00:00
Tim Schaub
2337f9f2d8 Adding angle brackets to link class names in the docs (see #983).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4353 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-17 16:59:16 +00:00
Tim Schaub
dd8d895460 Modify away! This was a long time coming. Thanks all for contributions. The ModifyFeature control lets you select a feature for modification, drag around vertices (or the whole feature in the case of a point), delete vertices, and add new vertices (closes #941).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4272 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-13 23:22:06 +00:00