From e73440e9f1d83f334e194c3f8cbc403264b628cd Mon Sep 17 00:00:00 2001 From: Simon Howe Date: Thu, 18 Aug 2016 14:50:37 +0200 Subject: [PATCH] Fixes top of node-blue-search-highlight from being chopped off. - Increase line height so that it doesn't fall over the side of the container (which is overflow: hidden). - Compensate for line-height increase w/ small label position tweak. --- client/app/scripts/charts/node.js | 2 +- client/app/styles/main.less | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client/app/scripts/charts/node.js b/client/app/scripts/charts/node.js index 6a1ff9b95..63511fdfa 100644 --- a/client/app/scripts/charts/node.js +++ b/client/app/scripts/charts/node.js @@ -93,7 +93,7 @@ class Node extends React.Component { const truncate = !focused && !hovered; const labelWidth = nodeScale(scaleFactor * 3); const labelOffsetX = -labelWidth / 2; - const labelDy = (showingNetworks && networks) ? 0.75 : 0.60; + const labelDy = (showingNetworks && networks) ? 0.70 : 0.55; const labelOffsetY = nodeScale(labelDy * scaleFactor); const networkOffset = nodeScale(scaleFactor * 0.67); diff --git a/client/app/styles/main.less b/client/app/styles/main.less index e2da1eed5..e00bbdab6 100644 --- a/client/app/styles/main.less +++ b/client/app/styles/main.less @@ -361,7 +361,6 @@ h2 { // stroke-width: 4px; } - .node-label, .node-sublabel { line-height: 125%; } @@ -371,7 +370,6 @@ h2 { } .node-label-wrapper { - // // Base line height doesn't hop across foreignObject =/ // @@ -400,10 +398,10 @@ h2 { .node-label, .node-sublabel { span { - padding: 0 0.25em; border-radius: 2px; } span:not(.match) { + padding: 0 0.25em; background-color: fade(@background-average-color, 70%); } }