patch for #625 - remove extraneous _observeAndCache() function which is only used once. it doesnt seem to conceptually abstract anything, so lets inline it
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2991 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -114,18 +114,6 @@ OpenLayers.Event = {
|
|||||||
name = 'keydown';
|
name = 'keydown';
|
||||||
}
|
}
|
||||||
|
|
||||||
this._observeAndCache(element, name, observer, useCapture);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {DOMElement} element
|
|
||||||
* @param {String} name
|
|
||||||
* @param {function} observer
|
|
||||||
* @param {Boolean} useCapture
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
_observeAndCache: function(element, name, observer, useCapture) {
|
|
||||||
|
|
||||||
//if observers cache has not yet been created, create it
|
//if observers cache has not yet been created, create it
|
||||||
if (!this.observers) {
|
if (!this.observers) {
|
||||||
this.observers = new Object();
|
this.observers = new Object();
|
||||||
@@ -135,6 +123,7 @@ OpenLayers.Event = {
|
|||||||
if (!this.observers[element.id]) {
|
if (!this.observers[element.id]) {
|
||||||
this.observers[element.id] = new Array();
|
this.observers[element.id] = new Array();
|
||||||
}
|
}
|
||||||
|
|
||||||
//add a new observer to this element's list
|
//add a new observer to this element's list
|
||||||
this.observers[element.id].push({
|
this.observers[element.id].push({
|
||||||
'element': element,
|
'element': element,
|
||||||
|
|||||||
Reference in New Issue
Block a user