Skip to content

Commit

Permalink
Remove extra font parsing in Scale.fit
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jan 12, 2020
1 parent b1421c6 commit cf4f545
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/core.scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,12 @@ class Scale extends Element {

// Don't bother fitting the ticks if we are not showing the labels
if (tickOpts.display && display) {
const tickFonts = parseTickFontOptions(tickOpts);
const labelSizes = me._getLabelSizes();
const firstLabelSize = labelSizes.first;
const lastLabelSize = labelSizes.last;
const widestLabelSize = labelSizes.widest;
const highestLabelSize = labelSizes.highest;
const lineSpace = tickFonts.minor.lineHeight * 0.4;
const lineSpace = highestLabelSize.offset * 0.8;
const tickPadding = tickOpts.padding;

if (isHorizontal) {
Expand Down

0 comments on commit cf4f545

Please sign in to comment.