From 66ba26586fb5a8df1817a07dcc5449170a93ba79 Mon Sep 17 00:00:00 2001 From: darzu Date: Wed, 31 Aug 2016 13:59:20 -0700 Subject: [PATCH] fixes wire highlighting in instructions --- sim/microbit.ts | 5 +++++ sim/visuals/boardhost.ts | 9 +++------ sim/visuals/wiring.ts | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sim/microbit.ts b/sim/microbit.ts index c2a61cb3..1d5d2842 100644 --- a/sim/microbit.ts +++ b/sim/microbit.ts @@ -127,6 +127,11 @@ namespace pxsim.visuals { { visibility: hidden; } + .sim-wireframe .sim-label + { + stroke: none; + fill: #777; + } .sim-wireframe .sim-board { stroke-width: 2px; } diff --git a/sim/visuals/boardhost.ts b/sim/visuals/boardhost.ts index e509bbae..f0ac0ed0 100644 --- a/sim/visuals/boardhost.ts +++ b/sim/visuals/boardhost.ts @@ -93,18 +93,15 @@ namespace pxsim.visuals { } public highlightWire(wire: Wire) { + //TODO: move to wiring.ts //underboard wires wire.wires.forEach(e => { + svg.addClass(e, "highlight"); (e).style["visibility"] = "visible"; }); //un greyed out - [wire.end1, wire.end2].forEach(e => { - svg.addClass(e, "highlight"); - }); - wire.wires.forEach(e => { - svg.addClass(e, "highlight"); - }); + svg.addClass(wire.endG, "highlight"); } public getView(): SVGElement { diff --git a/sim/visuals/wiring.ts b/sim/visuals/wiring.ts index 4608bab2..1f1248e0 100644 --- a/sim/visuals/wiring.ts +++ b/sim/visuals/wiring.ts @@ -24,7 +24,7 @@ namespace pxsim.visuals { stroke-dasharray: ${PIN_DIST / 10.0},${PIN_DIST / 1.5}; /*stroke-opacity: 0.4;*/ } - .grayed .sim-bb-wire-end:not(.highlight) { + .grayed .sim-bb-wire-ends-g:not(.highlight) .sim-bb-wire-end { stroke: #777; fill: #777; }