Control.GetFeature should abort requests with protocol.abort() instead of response.priv.abort(), r=ahocevar (closes #1999)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9165 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2009-04-01 16:25:35 +00:00
parent 339f5bf8f6
commit 4254d1efdf
2 changed files with 25 additions and 11 deletions

View File

@@ -133,13 +133,13 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
* instances.
*/
handlers: null,
/**
* Property: hoverRequest
* {<OpenLayers.Request>} contains the currently running hover request
* (if any).
* Property: hoverResponse
* {<OpenLayers.Protocol.Response>} The response object associated with
* the currently running hover request (if any).
*/
hoverRequest: null,
hoverResponse: null,
/**
* Constant: EVENT_TYPES
@@ -324,9 +324,9 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
* Callback from the handlers.hover set up when <hover> selection is on
*/
cancelHover: function() {
if (this.hoverRequest) {
this.hoverRequest.abort();
this.hoverRequest = null;
if (this.hoverResponse) {
this.protocol.abort(this.hoverResponse);
this.hoverResponse = null;
}
},
@@ -378,7 +378,7 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
scope: this
});
if(options.hover == true) {
this.hoverRequest = response.priv;
this.hoverResponse = response;
}
},