move applyDefaults up to be next to (related) getParameterString()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@490 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+19
-18
@@ -784,6 +784,25 @@ OpenLayers.Util.createAlphaImageDiv = function(id, px, sz, imgURL,
|
|||||||
return div;
|
return div;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/** Takes a hash and copies any keys that don't exist from
|
||||||
|
* another hash, by analogy with Object.extend() from
|
||||||
|
* Prototype.js.
|
||||||
|
*
|
||||||
|
* @param {Object} to
|
||||||
|
* @param {Object} from
|
||||||
|
*
|
||||||
|
* @type Object
|
||||||
|
*/
|
||||||
|
OpenLayers.Util.applyDefaults = function (to, from) {
|
||||||
|
for (var key in from) {
|
||||||
|
if (to[key] == null) {
|
||||||
|
to[key] = from[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return to;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} params
|
* @param {Object} params
|
||||||
*
|
*
|
||||||
@@ -814,24 +833,6 @@ OpenLayers.Util.getImagesLocation = function() {
|
|||||||
return OpenLayers._getScriptLocation() + "img/";
|
return OpenLayers._getScriptLocation() + "img/";
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Takes a hash and copies any keys that don't exist from
|
|
||||||
* another hash, by analogy with Object.extend() from
|
|
||||||
* Prototype.js.
|
|
||||||
*
|
|
||||||
* @param {Object} to
|
|
||||||
* @param {Object} from
|
|
||||||
*
|
|
||||||
* @type Object
|
|
||||||
*/
|
|
||||||
OpenLayers.Util.applyDefaults = function (to, from) {
|
|
||||||
for (var key in from) {
|
|
||||||
if (to[key] == null) {
|
|
||||||
to[key] = from[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return to;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** These could/should be made namespace aware?
|
/** These could/should be made namespace aware?
|
||||||
|
|||||||
Reference in New Issue
Block a user