Add ol.Object#unByKey

This commit is contained in:
Tom Payne
2013-04-25 16:51:46 +02:00
parent fa2582a2f1
commit 09fe09e42b
2 changed files with 9 additions and 0 deletions

View File

@@ -7,5 +7,6 @@
@exportProperty ol.Object.prototype.setOptions
@exportProperty ol.Object.prototype.setValues
@exportProperty ol.Object.prototype.un
@exportProperty ol.Object.prototype.unByKey
@exportProperty ol.Object.prototype.unbind
@exportProperty ol.Object.prototype.unbindAll

View File

@@ -309,6 +309,14 @@ ol.Object.prototype.un = function(type, listener, opt_scope) {
};
/**
* @param {?number} key Key.
*/
ol.Object.prototype.unByKey = function(key) {
goog.events.unlistenByKey(key);
};
/**
* Removes all bindings.
*/