OpenLayers OpenLayers

Ticket #1427: patch-1427-r7159-A0.diff

File patch-1427-r7159-A0.diff, 1.0 kB (added by elemoine, 8 months ago)
  • lib/OpenLayers/Control/ModifyFeature.js

    old new  
    297297     *     selected feature. 
    298298     */ 
    299299    selectFeature: function(object) { 
    300         this.feature = object.feature; 
    301         this.resetVertices(); 
    302         this.dragControl.activate(); 
    303         this.onModificationStart(this.feature); 
    304         this.layer.events.triggerEvent("beforefeaturemodified",  
    305                                        {feature: this.feature}); 
     300        var cont = this.layer.events.triggerEvent( 
     301            "beforefeaturemodified", {feature: object.feature} 
     302        ); 
     303        if(cont !== false) { 
     304            this.feature = object.feature; 
     305            this.resetVertices(); 
     306            this.dragControl.activate(); 
     307            this.onModificationStart(this.feature); 
     308        } 
    306309    }, 
    307310 
    308311    /**