Skip to content

Commit

Permalink
Merge pull request #3 from benrifkah/text-artifacts
Browse files Browse the repository at this point in the history
hide dummy div after measuring for issue HumbleSoftware#236
  • Loading branch information
shimondoodkin authored Apr 5, 2018
2 parents 07779bd + 8a336a1 commit 9b247ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flotr2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2281,8 +2281,10 @@ Text.prototype = {
D.setStyles(div, { 'position' : 'absolute', 'top' : '-10000px' });
D.insert(div, '<div style="'+style+'" class="'+className+' flotr-dummy-div">' + text + '</div>');
D.insert(this.o.element, div);
var dim = D.size(div);
D.hide(div);

return D.size(div);
return dim;
},

measureText : function (text, style) {
Expand Down

0 comments on commit 9b247ea

Please sign in to comment.