Changeset 490
- Timestamp:
- 06/01/06 06:33:53 (3 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Util.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Util.js
r486 r490 785 785 }; 786 786 787 788 /** Takes a hash and copies any keys that don't exist from 789 * another hash, by analogy with Object.extend() from 790 * Prototype.js. 791 * 792 * @param {Object} to 793 * @param {Object} from 794 * 795 * @type Object 796 */ 797 OpenLayers.Util.applyDefaults = function (to, from) { 798 for (var key in from) { 799 if (to[key] == null) { 800 to[key] = from[key]; 801 } 802 } 803 return to; 804 }; 805 787 806 /** 788 807 * @param {Object} params … … 813 832 OpenLayers.Util.getImagesLocation = function() { 814 833 return OpenLayers._getScriptLocation() + "img/"; 815 };816 817 /** Takes a hash and copies any keys that don't exist from818 * another hash, by analogy with Object.extend() from819 * Prototype.js.820 *821 * @param {Object} to822 * @param {Object} from823 *824 * @type Object825 */826 OpenLayers.Util.applyDefaults = function (to, from) {827 for (var key in from) {828 if (to[key] == null) {829 to[key] = from[key];830 }831 }832 return to;833 834 }; 834 835
