Browse Source

removed double code

v3_develop
Alex de Mulder 10 years ago
parent
commit
568aa702ca
1 changed files with 1 additions and 29 deletions
  1. +1
    -29
      lib/util.js

+ 1
- 29
lib/util.js View File

@ -1099,7 +1099,7 @@ exports.mergeOptions = function (mergeTarget, options, option) {
}
else {
mergeTarget[option].enabled = true;
for (prop in options[option]) {
for (var prop in options[option]) {
if (options[option].hasOwnProperty(prop)) {
mergeTarget[option][prop] = options[option][prop];
}
@ -1109,34 +1109,6 @@ exports.mergeOptions = function (mergeTarget, options, option) {
}
/**
* this is used to set the options of subobjects in the options object. A requirement of these subobjects
* is that they have an 'enabled' element which is optional for the user but mandatory for the program.
*
* @param [object] mergeTarget | this is either this.options or the options used for the groups.
* @param [object] options | options
* @param [String] option | this is the option key in the options argument
* @private
*/
exports.mergeOptions = function (mergeTarget, options, option) {
if (options[option] !== undefined) {
if (typeof options[option] == 'boolean') {
mergeTarget[option].enabled = options[option];
}
else {
mergeTarget[option].enabled = true;
for (prop in options[option]) {
if (options[option].hasOwnProperty(prop)) {
mergeTarget[option][prop] = options[option][prop];
}
}
}
}
}
/**
* This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses
* this function will then iterate in both directions over this sorted list to find all visible items.

Loading…
Cancel
Save