Resolves #418 switch to bounding client rect due to weird chrome bug

This commit is contained in:
Peter Cottle 2017-03-22 22:00:23 -07:00
parent 71c8700ad1
commit 6d88297e0b

View file

@ -289,7 +289,7 @@ var VisBranch = VisBase.extend({
getTextSize: function() { getTextSize: function() {
var getTextWidth = function(visBranch) { var getTextWidth = function(visBranch) {
var textNode = (visBranch.get('text')) ? visBranch.get('text').node : null; 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) { var firefoxFix = function(obj) {