mirror of
https://github.com/konvajs/konva.git
synced 2025-10-07 16:13:47 +08:00
Merge pull request #537 from VladimirTechMan/master
Simplify the Boolean condition used in _useBufferCanvas()
This commit is contained in:
18
src/Shape.ts
18
src/Shape.ts
@@ -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()
|
||||
);
|
||||
}
|
||||
/**
|
||||
|
Reference in New Issue
Block a user