From 1b6caddb85734243cf7b538f3f5c1fc2eae2c386 Mon Sep 17 00:00:00 2001 From: futpib Date: Thu, 22 Nov 2018 02:43:53 +0300 Subject: [PATCH] Fix node text appearance --- components/graph/index.js | 18 ++++++++++++++---- index.css | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/components/graph/index.js b/components/graph/index.js index c2543de..9d69c80 100644 --- a/components/graph/index.js +++ b/components/graph/index.js @@ -497,8 +497,13 @@ const SinkText = ({ dgo, pai, state, selected }) => r(React.Fragment, [ title: pai.name, }, pai.description), ]), - !selected && r(VolumeThumbnail, { pai, state }), - selected && r(VolumeControls, { pai, state }), + + r.div({ + className: 'node-main', + }, [ + r(selected ? VolumeControls : VolumeThumbnail, { pai, state }), + ]), + r(RemoteTunnelInfo, { pai }), r(DebugText, { dgo, pai, state }), ]); @@ -519,8 +524,13 @@ const SourceText = ({ dgo, pai, state, selected }) => r(React.Fragment, [ title: pai.name, }, pai.description), ]), - !selected && r(VolumeThumbnail, { pai, state }), - selected && r(VolumeControls, { pai, state }), + + r.div({ + className: 'node-main', + }, [ + r(selected ? VolumeControls : VolumeThumbnail, { pai, state }), + ]), + r(RemoteTunnelInfo, { pai }), r(DebugText, { dgo, pai, state }), ]); diff --git a/index.css b/index.css index 28f4ab0..c60c31b 100644 --- a/index.css +++ b/index.css @@ -302,7 +302,7 @@ div[tabindex="-1"]:focus { flex-direction: column; } -.node-text > .volume-thumbnail { +.node-text > .node-main { flex-grow: 1; }