Merge pull request #537 from VladimirTechMan/master

Simplify the Boolean condition used in _useBufferCanvas()
This commit is contained in:
Anton Lavrenov
2019-01-14 13:27:19 -05:00
committed by GitHub

View File

@@ -218,18 +218,12 @@ export class Shape extends Node {
}
_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()
);
}
/**