diff --git a/media/search/js/Search.js b/media/search/js/Search.js index 5c443b0e..213c822f 100644 --- a/media/search/js/Search.js +++ b/media/search/js/Search.js @@ -82,10 +82,12 @@ SearchResult.setupUI = function() { steps = cSteps.split(',').map(function(i) { return i.toInt(); }); } + var initialStep = Math.max(0 ,steps.indexOf(cValue.get('text').toInt())); + var copiesSlider = new Slider(cSlider, cKnob, { //snap: true, steps: steps.length - 1, - initialStep: steps[cValue.get('text').toInt()] || 0, + initialStep: initialStep, onChange: function(step) { cValue.set('text', steps[step]); },