From ea325a6ffaf73c7d9590c524bb524d8dc5ab521a Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 14 Mar 2016 14:32:33 -0700 Subject: [PATCH] updated temperature rendering --- sim/simsvg.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim/simsvg.ts b/sim/simsvg.ts index a23e97e4..56d89bba 100644 --- a/sim/simsvg.ts +++ b/sim/simsvg.ts @@ -260,7 +260,7 @@ namespace ks.rt.micro_bit { rx:5, ry:5, fill:`url(#${gid})` }); - this.thermometerText = Svg.child(this.g, "text", { class:'sim-text', x:75, y:130}) as SVGTextElement; + this.thermometerText = Svg.child(this.g, "text", { class:'sim-text', x:60, y:130}) as SVGTextElement; this.updateTheme(); let pt = this.element.createSVGPoint(); @@ -276,7 +276,7 @@ namespace ks.rt.micro_bit { let t = Math.max(tmin, Math.min(tmax, state.temperature)) let per = Math.floor((state.temperature - tmin) / (tmax-tmin)*100) Svg.setGradientValue(this.thermometerGradient, 100 - per + '%'); - this.thermometerText.textContent = t + '°'; + this.thermometerText.textContent = t + '°C'; } private updateHeading() {