Check return values from activate()/deactivate() in subclassed Handlers and Controls, as appropriate. Fixes #599.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2955 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -113,13 +113,21 @@ OpenLayers.Handler.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Handler,
|
||||
},
|
||||
|
||||
activate: function () {
|
||||
OpenLayers.Handler.prototype.activate.apply(this, arguments);
|
||||
this.dragHandler.activate();
|
||||
if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
|
||||
this.dragHandler.activate();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
deactivate: function () {
|
||||
OpenLayers.Handler.prototype.deactivate.apply(this, arguments);
|
||||
this.dragHandler.deactivate();
|
||||
if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
|
||||
this.dragHandler.deactivate();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Handler.Box"
|
||||
|
||||
Reference in New Issue
Block a user