Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Fix display bug in last hint of one_step_inequalities; fix #110964
Browse files Browse the repository at this point in the history
Test Plan: Verify last hint shows a graph of the correct answer for http://exercises.ka.local/exercises/one_step_inequalities.html?seed=181&problem=0&debug&lang=en

Auditors: alex
  • Loading branch information
Ben Eater committed Nov 13, 2013
1 parent b77dd74 commit 37aa3d0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions exercises/one_step_inequalities.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
init({
range: [ [-1, 11], [-1, 1] ],
});
var start = SOLUTION_REAL - 4.5;
var end = SOLUTION_REAL + 4.5;
var start = floor(SOLUTION_REAL - 4.5);
var end = ceil(SOLUTION_REAL + 4.5);

numberLine( start, end );

Expand All @@ -85,31 +85,31 @@
var startOffset = 0.12;
switch ( COMP_SOLUTION ) {
case ">":
fill = null;
fill = BACKGROUND;
offset = 5;
break;
case "≥":
fill = "#6495ED";
fill = BLUE;
offset = 5;
break;
case "<":
fill = null;
fill = BACKGROUND;
offset = -5;
startOffset *= -1;
break;
case "≤":
fill = "#6495ED";
fill = BLUE;
offset = -5;
startOffset *= -1;
break;
}

var x = SOLUTION_REAL - start;

style({ stroke: "#FFA500", fill: "#FFA500", strokeWidth: 3.5, arrows: "->" });
style({ stroke: BLUE, fill: BLUE, strokeWidth: 3.5, arrows: "->" });
path([ [ x + startOffset, 0 ], [ x + offset, 0 ]]);
style({ stroke: "#6495ED", strokeWidth: 2.0, fill: fill });
circle([ x, 0 ], 0.15 );
style({ stroke: BLUE, strokeWidth: 3.0, fill: fill });
circle([ x, 0 ], 0.12 );
</div>
</div>
</div>
Expand Down

0 comments on commit 37aa3d0

Please sign in to comment.