From 6d88297e0beeb3f6f3581990e36b52f1e5dff585 Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Wed, 22 Mar 2017 22:00:23 -0700 Subject: [PATCH] Resolves #418 switch to bounding client rect due to weird chrome bug --- src/js/visuals/visBranch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/visuals/visBranch.js b/src/js/visuals/visBranch.js index 3e7a1219..94e45009 100644 --- a/src/js/visuals/visBranch.js +++ b/src/js/visuals/visBranch.js @@ -289,7 +289,7 @@ var VisBranch = VisBase.extend({ getTextSize: function() { var getTextWidth = function(visBranch) { var textNode = (visBranch.get('text')) ? visBranch.get('text').node : null; - return (textNode === null) ? 0 : textNode.clientWidth; + return (textNode === null) ? 0 : textNode.getBoundingClientRect().width; }; var firefoxFix = function(obj) { @@ -502,7 +502,7 @@ var VisBranch = VisBase.extend({ if (this.getIsGoalAndNotCompared()) { return this.get('stroke-width') / 5.0; } - + return this.get('stroke-width'); },