1/*DCM++ © Dominique Cavailhez 2012. 2 * Published under the Clear BSD license. 3 * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full text of the license. */ 4 5/** 6 * @requires OpenLayers/Control/ModifyFeature.js 7 */ 8 9/** 10 * Class: OpenLayers.Control.DeleteFeature 11 * Create an instance of OpenLayers.Control.ModifyFeature that completely remove a feature 12 * 13 * Inherits from: 14 * - <OpenLayers.Control.ModifyFeature> 15 */ 16 17OpenLayers.Control.DeleteFeature = OpenLayers.Class(OpenLayers.Control.ModifyFeature, { 18 19 // Click sur la ligne : on détruit toute la ligne 20 selectFeature: function(feature) { 21 if ((!this.standalone || 22 this.layer.events.triggerEvent("beforefeaturesremoved", {feature: feature}) !== false 23 ) && 24 confirm ('Destruction ' + (feature.attributes.name || feature.id) + ' ?')) { 25 feature.destroy (); 26 this.layer.events.triggerEvent("featureremoved", {feature: feature}) 27 } 28 }, 29 30 CLASS_NAME: "OpenLayers.Control.DeleteFeature" 31});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.