Changeset 7601
- Timestamp:
- 07/29/08 23:41:22 (4 months ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Control/DrawFeature.js (modified) (3 diffs)
- trunk/openlayers/tests/Control/DrawFeature.html (added)
- trunk/openlayers/tests/list-tests.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Control/DrawFeature.js
r5614 r7601 31 31 32 32 /** 33 * Constant: EVENT_TYPES 34 * 35 * Supported event types: 36 * - *featureadded* Triggered when a feature is added 37 */ 38 EVENT_TYPES: ["featureadded"], 39 40 /** 33 41 * APIProperty: featureAdded 34 42 * {Function} Called after each feature is added … … 51 59 */ 52 60 initialize: function(layer, handler, options) { 61 62 // concatenate events specific to vector with those from the base 63 this.EVENT_TYPES = 64 OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat( 65 OpenLayers.Control.prototype.EVENT_TYPES 66 ); 67 53 68 OpenLayers.Control.prototype.initialize.apply(this, [options]); 54 69 this.callbacks = OpenLayers.Util.extend({done: this.drawFeature}, … … 65 80 this.layer.addFeatures([feature]); 66 81 this.featureAdded(feature); 82 this.events.triggerEvent("featureadded",{feature : feature}); 67 83 }, 68 84 trunk/openlayers/tests/list-tests.html
r7590 r7601 91 91 <li>Control/DragFeature.html</li> 92 92 <li>Control/DragPan.html</li> 93 <li>Control/DrawFeature.html</li> 93 94 <li>Control/LayerSwitcher.html</li> 94 95 <li>Control/ModifyFeature.html</li>
