Remove personal prettier changes

remove more personal prettier changes

remove personal prettier changes
This commit is contained in:
Adam Greenan 2024-12-11 13:37:28 +00:00
parent a24b30b110
commit 505348099d

View File

@ -310,7 +310,7 @@ export class Text extends Shape<TextConfig> {
spacesNumber = text.split(' ').length - 1; spacesNumber = text.split(' ').length - 1;
oneWord = spacesNumber === 0; oneWord = spacesNumber === 0;
lineWidth = lineWidth =
align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width; align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;
context.lineTo( context.lineTo(
lineTranslateX + Math.round(lineWidth), lineTranslateX + Math.round(lineWidth),
translateY + lineTranslateY + yOffset translateY + lineTranslateY + yOffset
@ -383,8 +383,7 @@ export class Text extends Shape<TextConfig> {
return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width; return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;
} }
getHeight() { getHeight() {
const isAuto = const isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;
this.attrs.height === AUTO || this.attrs.height === undefined;
return isAuto return isAuto
? this.fontSize() * this.textArr.length * this.lineHeight() + ? this.fontSize() * this.textArr.length * this.lineHeight() +
this.padding() * 2 this.padding() * 2
@ -502,9 +501,7 @@ export class Text extends Shape<TextConfig> {
this.textArr = []; this.textArr = [];
getDummyContext().font = this._getContextFont(); getDummyContext().font = this._getContextFont();
const additionalWidth = shouldAddEllipsis const additionalWidth = shouldAddEllipsis ? this._getTextWidth(ELLIPSIS) : 0;
? this._getTextWidth(ELLIPSIS)
: 0;
for (let i = 0, max = lines.length; i < max; ++i) { for (let i = 0, max = lines.length; i < max; ++i) {
let line = lines[i]; let line = lines[i];