Keyboard-related classes get destroy(). Fixes #598. Ba-ding.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2936 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -23,6 +23,18 @@ OpenLayers.Control.KeyboardDefaults.prototype =
|
||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
destroy: function() {
|
||||
if (this.handler) {
|
||||
this.handler.destroy();
|
||||
}
|
||||
this.handler = null;
|
||||
|
||||
OpenLayers.Control.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -32,6 +32,15 @@ OpenLayers.Handler.Keyboard.prototype = OpenLayers.Class.inherit( OpenLayers.Han
|
||||
this.eventListener = this.handleKeyEvent.bindAsEventListener(this);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
destroy: function() {
|
||||
this.deactivate();
|
||||
this.eventListener = null;
|
||||
OpenLayers.Control.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
activate: function() {
|
||||
OpenLayers.Handler.prototype.activate.apply(this, arguments);
|
||||
for (var i = 0; i < this.KEY_EVENTS.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user