fix remove() function and add test
git-svn-id: http://svn.openlayers.org/trunk/openlayers@871 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -111,7 +111,7 @@ OpenLayers.Events.prototype = {
|
||||
|
||||
/**
|
||||
* @param {String} type
|
||||
* @param {Object} obj
|
||||
* @param {Object} obj If none specified, defaults to this.object
|
||||
* @param {Function} func
|
||||
*/
|
||||
unregister: function (type, obj, func) {
|
||||
@@ -127,11 +127,15 @@ OpenLayers.Events.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
/** Remove all listeners for a given event type. If type is not registered,
|
||||
* does nothing.
|
||||
*
|
||||
* @param {String} type
|
||||
*/
|
||||
remove: function(type) {
|
||||
this.listeners[type].pop();
|
||||
if (this.listeners[type] != null) {
|
||||
this.listeners[type] = new Array();
|
||||
}
|
||||
},
|
||||
|
||||
/** Trigger a specified registered event
|
||||
|
||||
Reference in New Issue
Block a user