From 128825886ea5b46d9539f9f6d6a6ae51cc0d4811 Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 1 Jun 2006 10:33:53 +0000 Subject: [PATCH] move applyDefaults up to be next to (related) getParameterString() git-svn-id: http://svn.openlayers.org/trunk/openlayers@490 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Util.js | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) 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?