From 55bed7b7b6020078a80978a1474c49b7bfb6d4f2 Mon Sep 17 00:00:00 2001 From: Simon Howe Date: Tue, 12 Jul 2016 18:29:15 +0200 Subject: [PATCH] A couple more tweaks to the network-bar position. - Center it vertically properly. --- client/app/scripts/charts/node-networks-overlay.js | 5 +++-- client/app/scripts/charts/node.js | 8 +++----- client/app/styles/main.less | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/client/app/scripts/charts/node-networks-overlay.js b/client/app/scripts/charts/node-networks-overlay.js index c59f794ea..b09dcac2e 100644 --- a/client/app/scripts/charts/node-networks-overlay.js +++ b/client/app/scripts/charts/node-networks-overlay.js @@ -5,8 +5,8 @@ import { getNetworkColor } from '../utils/color-utils'; import { isContrastMode } from '../utils/contrast-utils'; -const barHeight = 5; // Gap size between bar segments. +const minBarHeight = 3; const padding = 0.05; const rx = 1; const ry = rx; @@ -16,6 +16,7 @@ function NodeNetworksOverlay({offset, size, stack, networks = makeList()}) { // Min size is about a quarter of the width, feels about right. const minBarWidth = (size / 4); const barWidth = Math.max(size, minBarWidth * networks.size); + const barHeight = Math.max(size * 0.085, minBarHeight); // Update singleton scale. x.domain(networks.map((n, i) => i).toJS()); @@ -24,7 +25,7 @@ function NodeNetworksOverlay({offset, size, stack, networks = makeList()}) { const bars = networks.map((n, i) => (