Skip to content

Commit

Permalink
Remove personal prettier changes
Browse files Browse the repository at this point in the history
remove more personal prettier changes

remove personal prettier changes
  • Loading branch information
Adam Greenan committed Dec 11, 2024
1 parent a24b30b commit 5053480
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/shapes/Text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export class Text extends Shape<TextConfig> {
spacesNumber = text.split(' ').length - 1;
oneWord = spacesNumber === 0;
lineWidth =
align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;
align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;
context.lineTo(
lineTranslateX + Math.round(lineWidth),
translateY + lineTranslateY + yOffset
Expand Down Expand Up @@ -383,8 +383,7 @@ export class Text extends Shape<TextConfig> {
return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;
}
getHeight() {
const isAuto =
this.attrs.height === AUTO || this.attrs.height === undefined;
const isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;
return isAuto
? this.fontSize() * this.textArr.length * this.lineHeight() +
this.padding() * 2
Expand Down Expand Up @@ -502,9 +501,7 @@ export class Text extends Shape<TextConfig> {

this.textArr = [];
getDummyContext().font = this._getContextFont();
const additionalWidth = shouldAddEllipsis
? this._getTextWidth(ELLIPSIS)
: 0;
const additionalWidth = shouldAddEllipsis ? this._getTextWidth(ELLIPSIS) : 0;
for (let i = 0, max = lines.length; i < max; ++i) {
let line = lines[i];

Expand Down

0 comments on commit 5053480

Please sign in to comment.