Skip to content

Commit

Permalink
Merge pull request #22483 from code-dot-org/slider-too-fast
Browse files Browse the repository at this point in the history
Set initial speed for step slider
  • Loading branch information
Erin Peach committed May 18, 2018
2 parents bf3dfd6 + 355d1fd commit 4059e73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/src/StudioApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import {getValidatedResult, initializeContainedLevel} from './containedLevels';
import {lockContainedLevelAnswers} from './code-studio/levels/codeStudioLevels';
import {parseElement as parseXmlElement} from './xml';
import {resetAniGif} from '@cdo/apps/utils';
import {setIsRunning} from './redux/runState';
import {setIsRunning, setStepSpeed} from './redux/runState';
import {setPageConstants} from './redux/pageConstants';
import {setVisualizationScale} from './redux/layout';
import {mergeProgress} from './code-studio/progressRedux';
Expand Down Expand Up @@ -214,6 +214,11 @@ StudioApp.prototype.configure = function (options) {

this.maxVisualizationWidth = options.maxVisualizationWidth || MAX_VISUALIZATION_WIDTH;
this.minVisualizationWidth = options.minVisualizationWidth || MIN_VISUALIZATION_WIDTH;

// Set default speed
if (options.level.sliderSpeed) {
setStepSpeed(options.level.sliderSpeed);
}
};

/**
Expand Down

0 comments on commit 4059e73

Please sign in to comment.