From 117f8b84443207b2cd72db2f87249c340f2851b5 Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Thu, 12 Nov 2015 16:18:19 +0100 Subject: [PATCH] Fix sublabel sizing --- client/app/scripts/charts/node.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/client/app/scripts/charts/node.js b/client/app/scripts/charts/node.js index b06c96dd0..f51154b5b 100644 --- a/client/app/scripts/charts/node.js +++ b/client/app/scripts/charts/node.js @@ -12,7 +12,7 @@ const Node = React.createClass({ render: function() { const props = this.props; - const scale = this.props.nodeScale; + const nodeScale = this.props.nodeScale; const zoomScale = this.props.zoomScale; let scaleFactor = 1; if (props.focused) { @@ -29,8 +29,8 @@ const Node = React.createClass({ const onMouseClick = this.handleMouseClick; const classNames = ['node']; const animConfig = [80, 20]; // stiffness, bounce - const label = this.ellipsis(props.label, 14, scale(4 * scaleFactor)); - const subLabel = this.ellipsis(props.subLabel, 12, scale(4 * scaleFactor)); + const label = this.ellipsis(props.label, 14, nodeScale(4 * scaleFactor)); + const subLabel = this.ellipsis(props.subLabel, 12, nodeScale(4 * scaleFactor)); let labelFontSize = 14; let subLabelFontSize = 12; @@ -66,16 +66,16 @@ const Node = React.createClass({ return ( - {props.highlighted && } - - - + {props.highlighted && } + + + + x="0" y={interpolated.labelOffsetY + nodeScale(0.5 * interpolated.f)}> {label} - + {subLabel}