Fixed bug. Specified values that are outside the allowed range now behave properly. Plot is redrawn after the value has been set to max (or min) value.

This commit is contained in:
Valera Rozuvan
2012-12-26 13:35:35 +02:00
committed by Alexander Kryklia
parent 535bd3f195
commit 421002808d

View File

@@ -207,11 +207,6 @@ define('State', ['logme'], function (logme) {
parameters[paramName].value = paramValueNum;
// If we have a plot DIV to work with, tell to update.
if (plotDiv !== undefined) {
plotDiv.trigger('update_plot');
}
// Update all text inputs with the new parameter's value.
for (c1 = 0; c1 < parameters[paramName].inputDivs.length; c1 += 1) {
parameters[paramName].inputDivs[c1].val(paramValueNum);
@@ -229,6 +224,11 @@ define('State', ['logme'], function (logme) {
dynamicEl[c1].outputEl.html(dynamicEl[c1].func.apply(window, allParameterValues));
}
// If we have a plot DIV to work with, tell to update.
if (plotDiv !== undefined) {
plotDiv.trigger('update_plot');
}
return true;
} // End-of: function setParameterValue