mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 21:34:50 +08:00
Fix globalCompositeOperation + cached hit detections. close #759
This commit is contained in:
@@ -419,7 +419,9 @@ export abstract class Container<ChildType extends Node> extends Node<
|
||||
}
|
||||
|
||||
var hasComposition =
|
||||
this.globalCompositeOperation() !== 'source-over' && !skipComposition;
|
||||
this.globalCompositeOperation() !== 'source-over' &&
|
||||
!skipComposition &&
|
||||
drawMethod === 'drawScene';
|
||||
if (hasComposition && layer) {
|
||||
context.save();
|
||||
context._applyGlobalCompositeOperation(this);
|
||||
|
||||
@@ -575,7 +575,6 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
||||
var canvasCache = this._getCanvasCache(),
|
||||
hitCanvas = canvasCache.hit;
|
||||
context.save();
|
||||
context._applyGlobalCompositeOperation(this);
|
||||
context.translate(canvasCache.x, canvasCache.y);
|
||||
context.drawImage(hitCanvas._canvas, 0, 0);
|
||||
context.restore();
|
||||
|
||||
@@ -50,7 +50,7 @@ function _strokeFunc(context) {
|
||||
* ' ': -0.05517578125,
|
||||
* 'T': -0.07421875,
|
||||
* 'V': -0.07421875
|
||||
* }
|
||||
* }
|
||||
* 'V': {
|
||||
* ',': -0.091796875,
|
||||
* ":": -0.037109375,
|
||||
|
||||
Reference in New Issue
Block a user