From 37aa3d0b6ea7210a84767f1826a798131e8cd42d Mon Sep 17 00:00:00 2001 From: Ben Eater Date: Tue, 12 Nov 2013 17:27:23 -0800 Subject: [PATCH] Fix display bug in last hint of one_step_inequalities; fix #110964 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 --- exercises/one_step_inequalities.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/exercises/one_step_inequalities.html b/exercises/one_step_inequalities.html index 019975432..95dc2cffd 100644 --- a/exercises/one_step_inequalities.html +++ b/exercises/one_step_inequalities.html @@ -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 ); @@ -85,20 +85,20 @@ 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; @@ -106,10 +106,10 @@ 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 );