diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 6987e0e062..7736e719bb 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -784,6 +784,25 @@ OpenLayers.Util.createAlphaImageDiv = function(id, px, sz, imgURL, 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 * @@ -814,24 +833,6 @@ OpenLayers.Util.getImagesLocation = function() { 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?