From 421002808df29e7de555a7aa591fee89b7447b48 Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Wed, 26 Dec 2012 13:35:35 +0200 Subject: [PATCH] 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. --- .../xmodule/js/src/graphical_slider_tool/state.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js index 47653a8ae9..77423d2a20 100644 --- a/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js +++ b/common/lib/xmodule/xmodule/js/src/graphical_slider_tool/state.js @@ -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