Adding vertexmodified, sketchmodified, and sketchcomplete events to the vector layer. These are triggered by the DrawFeature and ModifyFeature controls and let listeners know about newly drawn features and modified features. r=ahocevar (closes #1904)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8835 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-02-05 17:38:20 +00:00
parent f4bae0a011
commit 41670499b1
5 changed files with 169 additions and 16 deletions

View File

@@ -74,6 +74,19 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
* - *afterfeaturemodified* Triggered when a feature is finished being modified.
* Listeners will receive an object with a *feature* property referencing
* the modified feature.
* - *vertexmodified* Triggered when a vertex within any feature geometry
* has been modified. Listeners will receive an object with a
* *feature* property referencing the modified feature, a *vertex*
* property referencing the vertex modified (always a point geometry),
* and a *pixel* property referencing the pixel location of the
* modification.
* - *sketchmodified* Triggered when a feature sketch bound for this layer
* is modified. Listeners will receive an object with a *vertex*
* property referencing the modified vertex.
* - *sketchcomplete* Triggered when a feature sketch bound for this layer
* is complete. Listeners will receive an object with a *feature*
* property referencing the sketch feature. By returning false, a
* listener can stop the sketch feature from being added to the layer.
* - *refresh* Triggered when something wants a strategy to ask the protocol
* for a new set of features.
*/
@@ -82,6 +95,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
"beforefeatureremoved", "featureremoved", "featuresremoved",
"beforefeatureselected", "featureselected", "featureunselected",
"beforefeaturemodified", "featuremodified", "afterfeaturemodified",
"vertexmodified", "sketchmodified", "sketchcomplete",
"refresh"],
/**