Commit e703b3aa by Valera Rozuvan Committed by Alexander Kryklia

Refactoring GST.

parent 6bbcadb4
...@@ -141,25 +141,18 @@ define('Graph', ['logme'], function (logme) { ...@@ -141,25 +141,18 @@ define('Graph', ['logme'], function (logme) {
'end': 10, 'end': 10,
'step': 0.1 'step': 0.1
}; };
logme('Default xrange:', xrange);
// The 'xrange' is a string containing two floating point numbers // The 'xrange' is a string containing two floating point numbers
// separated by a comma. The first number is the starting // separated by a comma. The first number is the starting
// x-coordinate , the second number is the ending x-coordinate // x-coordinate , the second number is the ending x-coordinate
if (typeof config.plot['xrange'] === 'string') { if (typeof config.plot['xrange'] === 'string') {
logme('xrange is a string; xrange = "' + config.plot['xrange'] + '".');
xRangeStr = config.plot['xrange']; xRangeStr = config.plot['xrange'];
xRangeBlobs = xRangeStr.split(','); xRangeBlobs = xRangeStr.split(',');
if (xRangeBlobs.length === 2) { if (xRangeBlobs.length === 2) {
logme('xrange contains 2 blobs; 1 -> "' + xRangeBlobs[0] + '", 2 -> "' + xRangeBlobs[1] + '".');
tempNum = parseFloat(xRangeBlobs[0]); tempNum = parseFloat(xRangeBlobs[0]);
if (isNaN(tempNum) === false) { if (isNaN(tempNum) === false) {
xrange.start = tempNum; xrange.start = tempNum;
logme('First blob was parsed as a float. xrange.start = "' + xrange.start + '".');
} else { } else {
logme('ERROR: First blob was parsed as a NaN.'); logme('ERROR: First blob was parsed as a NaN.');
} }
...@@ -167,8 +160,6 @@ define('Graph', ['logme'], function (logme) { ...@@ -167,8 +160,6 @@ define('Graph', ['logme'], function (logme) {
tempNum = parseFloat(xRangeBlobs[1]); tempNum = parseFloat(xRangeBlobs[1]);
if (isNaN(tempNum) === false) { if (isNaN(tempNum) === false) {
xrange.end = tempNum; xrange.end = tempNum;
logme('Second blob was parsed as a float. xrange.end = "' + xrange.end + '".');
} else { } else {
logme('ERROR: Second blob was parsed as a NaN.'); logme('ERROR: Second blob was parsed as a NaN.');
} }
...@@ -176,8 +167,6 @@ define('Graph', ['logme'], function (logme) { ...@@ -176,8 +167,6 @@ define('Graph', ['logme'], function (logme) {
if (xrange.start >= xrange.end) { if (xrange.start >= xrange.end) {
xrange.start = 0; xrange.start = 0;
xrange.end = 10; xrange.end = 10;
logme('xrange.start is greater than xrange.end - will set defaults. xrange.start = "' + xrange.start + '". xrange.end = "' + xrange.end + '".');
} }
} else { } else {
...@@ -191,17 +180,13 @@ define('Graph', ['logme'], function (logme) { ...@@ -191,17 +180,13 @@ define('Graph', ['logme'], function (logme) {
// we will use it to generate a 'step' - i.e. the distance (on // we will use it to generate a 'step' - i.e. the distance (on
// x-axis) between two adjacent points. // x-axis) between two adjacent points.
if (typeof config.plot['num_points'] === 'string') { if (typeof config.plot['num_points'] === 'string') {
logme('num_points is a string. num_points = "' + config.plot['num_points'] + '".');
tempNum = parseInt(config.plot['num_points'], 10); tempNum = parseInt(config.plot['num_points'], 10);
if ( if (
(isNaN(tempNum) === false) || (isNaN(tempNum) === false) ||
(tempNum >= 2) && (tempNum >= 2) &&
(tempNum <= 500) (tempNum <= 500)
) { ) {
logme('num_points was parsed as a number. num_points = "' + tempNum + '".');
xrange.step = (xrange.end - xrange.start) / (tempNum - 1); xrange.step = (xrange.end - xrange.start) / (tempNum - 1);
logme('xrange.step = "' + xrange.step + '".');
} else { } else {
logme('ERROR: num_points was not parsed as a number, or num_points < 2, or num_points > 500.'); logme('ERROR: num_points was not parsed as a number, or num_points < 2, or num_points > 500.');
} }
......
...@@ -16,23 +16,47 @@ define( ...@@ -16,23 +16,47 @@ define(
function GstMain(gstId) { function GstMain(gstId) {
var config, gstClass, state; var config, gstClass, state;
// Get the JSON configuration, and parse it, and store as an object. // Get the JSON configuration, parse it, and store as an object.
try {
config = JSON.parse($('#' + gstId + '_json').html()).root; config = JSON.parse($('#' + gstId + '_json').html()).root;
} catch (err) {
logme('ERROR: could not parse config JSON.');
logme('$("#" + gstId + "_json").html() = ', $('#' + gstId + '_json').html());
logme('JSON.parse(...) = ', JSON.parse($('#' + gstId + '_json').html()));
logme('config = ', config);
return;
}
// Get the class name of the GST. All elements are assigned a class
// name that is based on the class name of the GST. For example, inputs
// are assigned a class name '{GST class name}_input'.
if (typeof config['@class'] !== 'string') {
logme('ERROR: Could not get the class name of GST.');
logme('config["@class"] = ', config['@class']);
return;
}
gstClass = config['@class']; gstClass = config['@class'];
logme('gstClass: ' + gstClass);
// Parse the configuration settings for sliders and text inputs, and // Parse the configuration settings for parameters, and store them in a
// extract all of the defined constants (their names along with their // state object.
// initial values). state = State(gstId, config);
state = State(gstId, gstClass, config);
// It is possible that something goes wrong while extracting parameters
// from the JSON config object. In this case, we will not continue.
if (state === undefined) {
logme('ERROR: The state object was not initialized properly.');
return;
}
// Create the sliders and the text inputs, attaching them to // Create the sliders and the text inputs, attaching them to
// approriate constants. // appropriate parameters.
Sliders(gstId, gstClass, state); Sliders(gstId, state);
Inputs(gstId, gstClass, state); Inputs(gstId, gstClass, state);
// Configure and display the loop. Attach event for the graph to be // Configure and display the graph. Attach event for the graph to be
// updated on any change of a slider or a text input. // updated on any change of a slider or a text input.
Graph(gstId, config, state); Graph(gstId, config, state);
} }
......
...@@ -10,14 +10,11 @@ define('Inputs', ['logme'], function (logme) { ...@@ -10,14 +10,11 @@ define('Inputs', ['logme'], function (logme) {
allParamNames = state.getAllParameterNames(); allParamNames = state.getAllParameterNames();
console.log(allParamNames);
for (c1 = 0; c1 < allParamNames.length; c1 += 1) { for (c1 = 0; c1 < allParamNames.length; c1 += 1) {
$('#' + gstId).children('.' + gstClass + '_input').each(function (index, value) { $('#' + gstId).children('.' + gstClass + '_input').each(function (index, value) {
var inputDiv, paramName; var inputDiv, paramName;
paramName = allParamNames[c1]; paramName = allParamNames[c1];
inputDiv = $(value); inputDiv = $(value);
if (paramName === inputDiv.data('var')) { if (paramName === inputDiv.data('var')) {
...@@ -29,23 +26,17 @@ define('Inputs', ['logme'], function (logme) { ...@@ -29,23 +26,17 @@ define('Inputs', ['logme'], function (logme) {
return; return;
function createInput(inputDiv, paramName) { function createInput(inputDiv, paramName) {
var paramObj, inputWidth, readOnly; var paramObj, readOnly;
paramObj = state.getParamObj(paramName); paramObj = state.getParamObj(paramName);
// We will define the width of the slider to a sensible default. // Check that the retrieval went OK.
inputWidth = 400; if (paramObj === undefined) {
logme('ERROR: Could not get a paramObj for parameter "' + paramName + '".');
// See if it was specified by the user. return;
if (isFinite(parseInt(inputDiv.data('el_width'))) === true) {
inputWidth = parseInt(inputDiv.data('el_width'));
} }
// Set the width of the element.
inputDiv.width(inputWidth);
inputDiv.css('display', 'inline-block');
readOnly = false; readOnly = false;
if (inputDiv.attr('data-el_readonly').toLowerCase() === 'true') { if (inputDiv.attr('data-el_readonly').toLowerCase() === 'true') {
readOnly = true; readOnly = true;
...@@ -79,9 +70,11 @@ define('Inputs', ['logme'], function (logme) { ...@@ -79,9 +70,11 @@ define('Inputs', ['logme'], function (logme) {
'outline': 'none', 'outline': 'none',
'cursor': 'text', 'cursor': 'text',
'height': '15px' 'height': '15px'
// 'width': '50px'
}); });
// Tell the parameter object from state that we are attaching a
// text input to it. Next time the parameter will be updated with
// a new value, tis input will also be updated.
paramObj.inputDivs.push(inputDiv); paramObj.inputDivs.push(inputDiv);
return; return;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
define('Sliders', ['logme'], function (logme) { define('Sliders', ['logme'], function (logme) {
return Sliders; return Sliders;
function Sliders(gstId, gstClass, state) { function Sliders(gstId, state) {
var c1, paramName, allParamNames, sliderDiv; var c1, paramName, allParamNames, sliderDiv;
allParamNames = state.getAllParameterNames(); allParamNames = state.getAllParameterNames();
...@@ -13,38 +13,33 @@ define('Sliders', ['logme'], function (logme) { ...@@ -13,38 +13,33 @@ define('Sliders', ['logme'], function (logme) {
for (c1 = 0; c1 < allParamNames.length; c1 += 1) { for (c1 = 0; c1 < allParamNames.length; c1 += 1) {
paramName = allParamNames[c1]; paramName = allParamNames[c1];
logme('Looking for slider with ID: ' + gstId + '_slider_' + paramName);
sliderDiv = $('#' + gstId + '_slider_' + paramName); sliderDiv = $('#' + gstId + '_slider_' + paramName);
if (sliderDiv.length === 1) { if (sliderDiv.length === 1) {
logme('Found one slider DIV with such an ID.');
createSlider(sliderDiv, paramName); createSlider(sliderDiv, paramName);
} else if (sliderDiv.length > 1) {
logme('ERROR: Found more than one slider for the parameter "' + paramName + '".');
logme('sliderDiv.length = ', sliderDiv.length);
} else { } else {
logme('Did not find such a slider.'); logme('MESSAGE: Did not find a slider for the parameter "' + paramName + '".');
} }
} }
function createSlider(sliderDiv, paramName) { function createSlider(sliderDiv, paramName) {
var paramObj, sliderWidth; var paramObj;
paramObj = state.getParamObj(paramName); paramObj = state.getParamObj(paramName);
// We will define the width of the slider to a sensible default. // Check that the retrieval went OK.
sliderWidth = 400; if (paramObj === undefined) {
logme('ERROR: Could not get a paramObj for parameter "' + paramName + '".');
// See if it was specified by the user. return;
if (isFinite(parseInt(sliderDiv.data('el_width'))) === true) {
sliderWidth = parseInt(sliderDiv.data('el_width'));
} }
// Set the width of the element.
sliderDiv.width(sliderWidth);
sliderDiv.css('display', 'inline-block');
// Create a jQuery UI slider from the slider DIV. We will set // Create a jQuery UI slider from the slider DIV. We will set
// starting parameters, and will also attach a handler to update // starting parameters, and will also attach a handler to update
// the 'state' on the 'change' event. // the 'state' on the 'slide' event.
sliderDiv.slider({ sliderDiv.slider({
'min': paramObj.min, 'min': paramObj.min,
'max': paramObj.max, 'max': paramObj.max,
...@@ -55,6 +50,9 @@ define('Sliders', ['logme'], function (logme) { ...@@ -55,6 +50,9 @@ define('Sliders', ['logme'], function (logme) {
'slide': sliderOnSlide 'slide': sliderOnSlide
}); });
// Tell the parameter object stored in state that we have a slider
// that is attached to it. Next time when the parameter changes, it
// will also update the value of this slider.
paramObj.sliderDiv = sliderDiv; paramObj.sliderDiv = sliderDiv;
return; return;
...@@ -65,7 +63,15 @@ define('Sliders', ['logme'], function (logme) { ...@@ -65,7 +63,15 @@ define('Sliders', ['logme'], function (logme) {
// This will cause the plot to be redrawn each time after the user // This will cause the plot to be redrawn each time after the user
// drags the slider handle and releases it. // drags the slider handle and releases it.
function sliderOnSlide(event, ui) { function sliderOnSlide(event, ui) {
state.setParameterValue(paramName, ui.value, sliderDiv);
// Last parameter passed to setParameterValue() will be 'true'
// so that the function knows we are a slider, and it can
// change the our value back in the case when the new value is
// invalid for some reason.
if (state.setParameterValue(paramName, ui.value, sliderDiv, true) === undefined) {
logme('ERROR: Could not update the parameter named "' + paramName + '" with the value "' + ui.value + '".');
}
} }
} }
} }
......
...@@ -6,14 +6,13 @@ define('State', ['logme'], function (logme) { ...@@ -6,14 +6,13 @@ define('State', ['logme'], function (logme) {
// Since there will be (can be) multiple GST on a page, and each will have // Since there will be (can be) multiple GST on a page, and each will have
// a separate state, we will create a factory constructor function. The // a separate state, we will create a factory constructor function. The
// constructor will expect the ID of the DIV with the GST contents, and the // constructor will expect the ID of the DIV with the GST contents, and the
// configuration object (parsed from a JSON string). It will return and // configuration object (parsed from a JSON string). It will return an
// object containing methods to set and get the private state properties. // object containing methods to set and get the private state properties.
// This module defines and returns a factory constructor. // This module defines and returns a factory constructor.
return State; return State;
// function: State function State(gstId, config) {
function State(gstId, gstClass, config) {
var parameters, allParameterNames, allParameterValues, var parameters, allParameterNames, allParameterValues,
plotDiv; plotDiv;
...@@ -21,18 +20,20 @@ define('State', ['logme'], function (logme) { ...@@ -21,18 +20,20 @@ define('State', ['logme'], function (logme) {
// an empty object. // an empty object.
// //
// As we parse the JSON config object, we will add parameters as // As we parse the JSON config object, we will add parameters as
// named properties (for example // named properties. For example
// //
// parameters.a = {...}; // parameters.a = {...};
// //
// for the parameter 'a'. // will be created for the parameter 'a'.
parameters = {}; parameters = {};
// Check that the required object is available. // Check that the required parameters config object is available.
if ( if ($.isPlainObject(config.parameters) === false) {
(typeof config.parameters !== 'undefined') && logme('ERROR: Expected config.parameters to be an object. It is not.');
(typeof config.parameters.param !== 'undefined') logme('config.parameters = ', config.parameters);
) {
return;
}
// If config.parameters.param is an array, pass it to the processor // If config.parameters.param is an array, pass it to the processor
// element by element. // element by element.
...@@ -51,11 +52,18 @@ define('State', ['logme'], function (logme) { ...@@ -51,11 +52,18 @@ define('State', ['logme'], function (logme) {
processParameter(config.parameters.param); processParameter(config.parameters.param);
} }
// If config.parameters.param is some other type, report an error and
// do not continue.
else {
logme('ERROR: config.parameters.param is of an unsupported type.');
logme('config.parameters.param = ', config.parameters.param);
return;
} }
// Instead of building these arrays every time when some component // Instead of building these arrays every time when some component
// requests them, we will create them in the beginning, and then update // requests them, we will create them in the beginning, and then update
// by element when some parameter's value changes. // each element individually when some parameter's value changes.
// //
// Then we can just return the required array, instead of iterating // Then we can just return the required array, instead of iterating
// over all of the properties of the 'parameters' object, and // over all of the properties of the 'parameters' object, and
...@@ -63,10 +71,9 @@ define('State', ['logme'], function (logme) { ...@@ -63,10 +71,9 @@ define('State', ['logme'], function (logme) {
allParameterNames = []; allParameterNames = [];
allParameterValues = []; allParameterValues = [];
// Populate 'allParameterNames', and 'allParameterValues' with data.
generateHelperArrays(); generateHelperArrays();
logme(parameters, allParameterNames, allParameterValues);
// The constructor will return an object with methods to operate on // The constructor will return an object with methods to operate on
// it's private properties. // it's private properties.
return { return {
...@@ -91,6 +98,8 @@ define('State', ['logme'], function (logme) { ...@@ -91,6 +98,8 @@ define('State', ['logme'], function (logme) {
function getParamObj(paramName) { function getParamObj(paramName) {
if (parameters.hasOwnProperty(paramName) === false) { if (parameters.hasOwnProperty(paramName) === false) {
logme('ERROR: Object parameters does not have a property named "' + paramName + '".');
return; return;
} }
...@@ -108,6 +117,8 @@ define('State', ['logme'], function (logme) { ...@@ -108,6 +117,8 @@ define('State', ['logme'], function (logme) {
// If the name of the constant is not tracked by state, return an // If the name of the constant is not tracked by state, return an
// 'undefined' value. // 'undefined' value.
if (parameters.hasOwnProperty(paramName) === false) { if (parameters.hasOwnProperty(paramName) === false) {
logme('ERROR: Object parameters does not have a property named "' + paramName + '".');
return; return;
} }
...@@ -119,6 +130,7 @@ define('State', ['logme'], function (logme) { ...@@ -119,6 +130,7 @@ define('State', ['logme'], function (logme) {
// Function: setParameterValue(paramName, paramValue, element) // Function: setParameterValue(paramName, paramValue, element)
// -------------------------------------------------- // --------------------------------------------------
// //
//
// This function can be called from a callback, registered by a slider // This function can be called from a callback, registered by a slider
// or a text input, when specific events ('slide' or 'change') are // or a text input, when specific events ('slide' or 'change') are
// triggered. // triggered.
...@@ -146,12 +158,14 @@ define('State', ['logme'], function (logme) { ...@@ -146,12 +158,14 @@ define('State', ['logme'], function (logme) {
// original value. // original value.
// //
// #################################################################### // ####################################################################
function setParameterValue(paramName, paramValue, element) { function setParameterValue(paramName, paramValue, element, slider) {
var paramValueNum, c1; var paramValueNum, c1;
// If a parameter with the name specified by the 'paramName' // If a parameter with the name specified by the 'paramName'
// parameter is not tracked by state, do not do anything. // parameter is not tracked by state, do not do anything.
if (parameters.hasOwnProperty(paramName) === false) { if (parameters.hasOwnProperty(paramName) === false) {
logme('ERROR: Object parameters does not have a property named "' + paramName + '".');
return; return;
} }
...@@ -159,38 +173,65 @@ define('State', ['logme'], function (logme) { ...@@ -159,38 +173,65 @@ define('State', ['logme'], function (logme) {
// number. // number.
paramValueNum = parseFloat(paramValue); paramValueNum = parseFloat(paramValue);
if (
// We are interested only in valid float values. NaN, -INF, // We are interested only in valid float values. NaN, -INF,
// +INF we will disregard. // +INF we will disregard.
(isFinite(paramValueNum) === false) || if (isFinite(paramValueNum) === false) {
logme('ERROR: New parameter value is not a floating-point number.');
logme('paramValue = ', paramValue);
return;
}
// If the new parameter's value is valid, but lies outised of // If the new parameter's value is valid, but lies outised of
// the parameter's allowed range, we will also disregard it. // the parameter's allowed range, we will disregard it.
//
// We will also change the element's value back to the current
// parameter's value.
if (
(paramValueNum < parameters[paramName].min) || (paramValueNum < parameters[paramName].min) ||
(paramValueNum > parameters[paramName].max) (paramValueNum > parameters[paramName].max)
) { ) {
// We will also change the element's value back to the current logme('ERROR: New parameter\'s value lies outside of the allowed range.');
// parameter's value. logme('Range is: min = ' + parameters[paramName].min + ', max = ' + parameters[paramName].max);
logme('paramValueNum = ' + paramValueNum);
// If element is a slider, the value must be set in a special
// way.
if (slider === true) {
logme('Changing back the slider.');
element.slider('value', parameters[paramName].value);
}
// If element is a text input, standard jQuery val() function
// will work.
else {
element.val(parameters[paramName].value); element.val(parameters[paramName].value);
}
return; return;
} }
parameters[paramName].value = paramValueNum; parameters[paramName].value = paramValueNum;
// If we have a plot DIV to work with, tell to update.
if (plotDiv !== undefined) { if (plotDiv !== undefined) {
plotDiv.trigger('update_plot'); plotDiv.trigger('update_plot');
} }
// Update all text inputs with the new parameter's value.
for (c1 = 0; c1 < parameters[paramName].inputDivs.length; c1 += 1) { for (c1 = 0; c1 < parameters[paramName].inputDivs.length; c1 += 1) {
parameters[paramName].inputDivs[c1].val(paramValueNum); parameters[paramName].inputDivs[c1].val(paramValueNum);
} }
// Update the single slider with the new parameter's value.
if (parameters[paramName].sliderDiv !== null) { if (parameters[paramName].sliderDiv !== null) {
parameters[paramName].sliderDiv.slider('value', paramValueNum); parameters[paramName].sliderDiv.slider('value', paramValueNum);
} }
// Update the helper array with the new parameter's value.
allParameterValues[parameters[paramName].helperArrayIndex] = paramValueNum; allParameterValues[parameters[paramName].helperArrayIndex] = paramValueNum;
return true;
} // End-of: function setParameterValue } // End-of: function setParameterValue
// #################################################################### // ####################################################################
...@@ -230,11 +271,8 @@ define('State', ['logme'], function (logme) { ...@@ -230,11 +271,8 @@ define('State', ['logme'], function (logme) {
var paramName, newParamObj; var paramName, newParamObj;
if (typeof obj['@var'] !== 'string') { if (typeof obj['@var'] !== 'string') {
logme( logme('ERROR: Expected obj["@var"] to be a string. It is not.');
'[ERROR] State.processParameter(obj): obj["@var"] is not a string.', logme('obj["@var"] = ', obj['@var']);
obj['@var'],
'---> Not adding a parameter.'
);
return; return;
} }
...@@ -248,14 +286,19 @@ define('State', ['logme'], function (logme) { ...@@ -248,14 +286,19 @@ define('State', ['logme'], function (logme) {
(processFloat('@step', 'step') === false) || (processFloat('@step', 'step') === false) ||
(processFloat('@initial', 'value') === false) (processFloat('@initial', 'value') === false)
) { ) {
logme('---> Not adding a parameter named "' + paramName + '".'); logme('ERROR: A required property is missing. Not creating parameter "' + paramName + '"');
return; return;
} }
// Pointers to text input and slider DIV elements that this
// parameter will be attached to. Initially there are none. When we
// will create text inputs and sliders, we will update these
// properties.
newParamObj.inputDivs = []; newParamObj.inputDivs = [];
newParamObj.sliderDiv = null; newParamObj.sliderDiv = null;
// Everything went well, so save the new parameter object.
parameters[paramName] = newParamObj; parameters[paramName] = newParamObj;
return; return;
...@@ -264,19 +307,16 @@ define('State', ['logme'], function (logme) { ...@@ -264,19 +307,16 @@ define('State', ['logme'], function (logme) {
var attrValue; var attrValue;
if (typeof obj[attrName] !== 'string') { if (typeof obj[attrName] !== 'string') {
logme( logme('ERROR: Expected obj["' + attrName + '"] to be a string. It is not.');
'[ERROR] state.processParameter(obj): obj["' + attrName + '"] is not a string.', logme('obj["' + attrName + '"] = ', obj[attrName]);
obj[attrName]
);
return false; return false;
} else { } else {
attrValue = parseFloat(obj[attrName]); attrValue = parseFloat(obj[attrName]);
if (isNaN(attrValue) === true) { if (isFinite(attrValue) === false) {
logme( logme('ERROR: Expected obj["' + attrName + '"] to be a valid floating-point number. It is not.');
'[ERROR] state.processParameter(obj): for attrName = "' + attrName + '" attrValue is NaN.' logme('obj["' + attrName + '"] = ', obj[attrName]);
);
return false; return false;
} }
...@@ -288,10 +328,22 @@ define('State', ['logme'], function (logme) { ...@@ -288,10 +328,22 @@ define('State', ['logme'], function (logme) {
} // End-of: function processFloat } // End-of: function processFloat
} // End-of: function processParameter } // End-of: function processParameter
// ####################################################################
//
// Function: generateHelperArrays()
// -------------------------------
//
//
// Populate 'allParameterNames' and 'allParameterValues' with data. // Populate 'allParameterNames' and 'allParameterValues' with data.
// Link each parameter object with the corresponding helper array via // Link each parameter object with the corresponding helper array via
// an index ('helperArrayIndex'). It will be the same for both of the // an index 'helperArrayIndex'. It will be the same for both of the
// arrays. // arrays.
//
// NOTE: It is important to remember to update these helper arrays
// whenever a new parameter is added (or one is removed), or when a
// parameter's value changes.
//
// ####################################################################
function generateHelperArrays() { function generateHelperArrays() {
var paramName, c1; var paramName, c1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment