diff --git a/src/Shape.ts b/src/Shape.ts index aa001de8..82d9ec4d 100644 --- a/src/Shape.ts +++ b/src/Shape.ts @@ -220,18 +220,12 @@ export class Shape extends Node { // try to use it without stage (use global buffer canvas) _useBufferCanvas(caching) { return ( - (!caching && - (this.perfectDrawEnabled() && - this.getAbsoluteOpacity() !== 1 && - this.hasFill() && - this.hasStroke() && - this.getStage())) || - (this.perfectDrawEnabled() && - this.hasShadow() && - this.getAbsoluteOpacity() !== 1 && - this.hasFill() && - this.hasStroke() && - this.getStage()) + (!caching || this.hasShadow()) && + this.perfectDrawEnabled() && + this.getAbsoluteOpacity() !== 1 && + this.hasFill() && + this.hasStroke() && + this.getStage() ); } /** diff --git a/src/shapes/Text.ts b/src/shapes/Text.ts index 97d87c6e..abc2ba47 100644 --- a/src/shapes/Text.ts +++ b/src/shapes/Text.ts @@ -336,11 +336,11 @@ export class Text extends Shape { return this.textArr.push({ text: line, width: width }); } _getTextWidth(text) { - var latterSpacing = this.letterSpacing(); + var letterSpacing = this.letterSpacing(); var length = text.length; return ( getDummyContext().measureText(text).width + - (length ? latterSpacing * (length - 1) : 0) + (length ? letterSpacing * (length - 1) : 0) ); } _setTextData() {