Merge pull request #1703 from xodio/fix-generic-jumper-coloring

Fix coloring of jumper node when it’s connected to generic pins
This commit is contained in:
Evgeny Kochetkov
2019-02-27 23:05:48 +03:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -110,7 +110,7 @@
&.error {
stroke: $color-datatype-dead;
}
&.generic {
&.t1 {
stroke: $color-node-outline;
}
}

View File

@@ -14,8 +14,9 @@ const JumperNodeBody = ({ pins }) => {
const type = R.cond([
[() => inConnected, R.pipe(R.prop(INPUT_PINKEY), getRenderablePinType)],
[() => outConnected, R.pipe(R.prop(OUTPUT_PINKEY), getRenderablePinType)],
[R.T, R.always('generic')],
// if output pin is not connected as well,
// it will fall back to good old `t1`
[R.T, R.pipe(R.prop(OUTPUT_PINKEY), getRenderablePinType)],
])(pins);
const isConnected =