diff --git a/client/app/scripts/charts/node-networks-overlay.js b/client/app/scripts/charts/node-networks-overlay.js index 22a371353..b09dcac2e 100644 --- a/client/app/scripts/charts/node-networks-overlay.js +++ b/client/app/scripts/charts/node-networks-overlay.js @@ -5,21 +5,18 @@ import { getNetworkColor } from '../utils/color-utils'; import { isContrastMode } from '../utils/contrast-utils'; -const barHeight = 5; -const barMarginTop = 6; -const labelHeight = 32; // Gap size between bar segments. +const minBarHeight = 3; const padding = 0.05; const rx = 1; const ry = rx; const x = d3.scale.ordinal(); -function NodeNetworksOverlay({labelOffsetY, size, stack, networks = makeList()}) { - const offset = labelOffsetY + labelHeight + barMarginTop; - +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()); @@ -28,7 +25,7 @@ function NodeNetworksOverlay({labelOffsetY, size, stack, networks = makeList()}) const bars = networks.map((n, i) => ( @@ -121,8 +123,7 @@ class Node extends React.Component {
- {!blurred && } + {!blurred && } } @@ -133,7 +134,7 @@ class Node extends React.Component { {...this.props} /> - {showingNetworks && } ); diff --git a/client/app/styles/main.less b/client/app/styles/main.less index da5f5d83e..acf5aa467 100644 --- a/client/app/styles/main.less +++ b/client/app/styles/main.less @@ -358,7 +358,6 @@ h2 { .node-label-wrapper { cursor: pointer; - padding-top: 6px; } .node-sublabel {