From 04575ad756ed877086eb5670e90a781a037f9a4e Mon Sep 17 00:00:00 2001 From: Evgeny Kochetkov Date: Wed, 27 Feb 2019 18:12:07 +0300 Subject: [PATCH] =?UTF-8?q?fix(xod-client):=20fix=20coloring=20of=20jumper?= =?UTF-8?q?=20node=20when=20it=E2=80=99s=20connected=20to=20generic=20pins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/xod-client/src/core/styles/components/Node.scss | 2 +- .../src/project/components/nodeParts/JumperNodeBody.jsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/xod-client/src/core/styles/components/Node.scss b/packages/xod-client/src/core/styles/components/Node.scss index efa4f8e2..790a46a7 100644 --- a/packages/xod-client/src/core/styles/components/Node.scss +++ b/packages/xod-client/src/core/styles/components/Node.scss @@ -110,7 +110,7 @@ &.error { stroke: $color-datatype-dead; } - &.generic { + &.t1 { stroke: $color-node-outline; } } diff --git a/packages/xod-client/src/project/components/nodeParts/JumperNodeBody.jsx b/packages/xod-client/src/project/components/nodeParts/JumperNodeBody.jsx index f0722740..339cc831 100644 --- a/packages/xod-client/src/project/components/nodeParts/JumperNodeBody.jsx +++ b/packages/xod-client/src/project/components/nodeParts/JumperNodeBody.jsx @@ -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 =