From ce321ccea38a9143e507f618148062b25d150376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 20 Mar 2008 07:26:21 +0000 Subject: [PATCH] dragging mode of modify feature control is broken. r=crschmidt,tschaub. (closes #1418) git-svn-id: http://svn.openlayers.org/trunk/openlayers@6564 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Handler/Feature.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Handler/Feature.js b/lib/OpenLayers/Handler/Feature.js index 96c486e0a6..769f8e6d8d 100644 --- a/lib/OpenLayers/Handler/Feature.js +++ b/lib/OpenLayers/Handler/Feature.js @@ -33,7 +33,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, { /** * Property: feature - * {} The feature currently being handled. + * {} The last feature that was hovered. */ feature: null, @@ -246,6 +246,12 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, { // out of last feature for the first time this.triggerCallback(type, 'out', [this.lastFeature]); } + // next time the mouse goes in a feature whose geometry type + // doesn't match we don't want to call the 'out' callback + // again, so let's set this.feature to null so that + // previouslyIn will evaluate to false the next time + // we enter handle. Yes, a bit hackish... + this.feature = null; } } else { if(previouslyIn || (click && this.lastFeature)) {