Skip to content
Browse files

fixes #6174 where route/dot/accent color are defined for summative ex…

…ercises

thanks for the thorough investigative research everyone.
  • Loading branch information...
1 parent 8ab9862 commit 62d12c878f75c86fbb23b1983edcc318dac52232 @nsfmc nsfmc committed
Showing with 5 additions and 7 deletions.
  1. +5 −7 khan-exercise.js
View
12 khan-exercise.js
@@ -1465,10 +1465,13 @@ var Khan = (function() {
var routes = $.map( exercises, function(exercise, i){
var state = exercise.exercise_states || { suggested:true } ;
- var routeColor, dotColor;
pathState = false;
$.each(state, function(i,v){ pathState = (v || pathState); });
+ var dotColor = "#ccc";
+ var routeColor = "#ccc";
+ var accentColor = "#fff";
+
if(pathState){
if(state.suggested){ // greenish
@@ -1488,12 +1491,7 @@ var Khan = (function() {
routeColor = "rgb(244, 189, 154)";
accentColor = "#ccc";
}
- }
- else{ // greyish
- dotColor = "#ccc";
- routeColor = "#ccc";
- accentColor = "#fff";
}
// draw nth path (paths are hand-coded, not autogenerated)
@@ -1510,7 +1508,7 @@ var Khan = (function() {
.attr("stroke-width",0);
// the path for the star/dot
- starpath = "M"+(endpoint.x-3)+","+(endpoint.y-1) + star;
+ var starpath = "M"+(endpoint.x-3)+","+(endpoint.y-1) + star;
var dot = map.path(starpath)
.attr("fill", accentColor) // the state of this exercise
.attr("stroke-width",0)

0 comments on commit 62d12c8

Please sign in to comment.
Something went wrong with that request. Please try again.