Clear the feature stored by the DragFeature control when the user moves the mouse out or when dragging completes (closes #942).

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4111 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-08-29 18:56:48 +00:00
parent c2148651ed
commit 06d41662d7
2 changed files with 31 additions and 0 deletions

View File

@@ -237,6 +237,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
*/
doneDragging: function(pixel) {
this.onComplete(this.feature, pixel);
this.feature = null;
},
/**
@@ -252,6 +253,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
this.dragHandler.deactivate();
// TBD replace with CSS classes
this.map.div.style.cursor = "default";
this.feature = null;
} else {
if(this.feature.id == feature.id) {
this.over = false;