move unloadCache() down so that stopObserving and stopObservingElement() are next to eachother

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2986 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-04-03 01:31:45 +00:00
parent 2f8a093f83
commit 2734030a82

View File

@@ -196,17 +196,6 @@ OpenLayers.Event = {
}
},
/** Cycle through all the element entries in the events cache and call
* stopObservingElement on each.
*/
unloadCache: function() {
if (!OpenLayers.Event.observers) return;
for (var elementId in OpenLayers.Event.observers) {
OpenLayers.Event.stopObservingElement.apply(this, [elementId]);
}
OpenLayers.Event.observers = false;
},
/**
* @param {DOMElement || String} elementParam
* @param {String} name
@@ -264,6 +253,17 @@ OpenLayers.Event = {
return foundEntry;
},
/** Cycle through all the element entries in the events cache and call
* stopObservingElement on each.
*/
unloadCache: function() {
if (!OpenLayers.Event.observers) return;
for (var elementId in OpenLayers.Event.observers) {
OpenLayers.Event.stopObservingElement.apply(this, [elementId]);
}
OpenLayers.Event.observers = false;
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Event"
};