mirror of
https://github.com/konvajs/konva.git
synced 2025-12-17 18:01:15 +08:00
Merge branch 'fix-cache-hit-before-added-to-layer' of git://github.com/kzhdev/KineticJS into kzhdev-fix-cache-hit-before-added-to-layer
This commit is contained in:
@@ -175,6 +175,8 @@
|
||||
sceneContext = cachedSceneCanvas.getContext(),
|
||||
hitContext = cachedHitCanvas.getContext();
|
||||
|
||||
cachedHitCanvas.isCache = true;
|
||||
|
||||
this.clearCache();
|
||||
|
||||
sceneContext.save();
|
||||
@@ -638,9 +640,10 @@
|
||||
* @memberof Kinetic.Node.prototype
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
shouldDrawHit: function() {
|
||||
shouldDrawHit: function(canvas) {
|
||||
var layer = this.getLayer();
|
||||
return layer && layer.hitGraphEnabled() && this.isListening() && this.isVisible() && !Kinetic.isDragging();
|
||||
return ((canvas && canvas.isCache) || (layer && layer.hitGraphEnabled()))
|
||||
&& this.isListening() && this.isVisible() && !Kinetic.isDragging();
|
||||
},
|
||||
/**
|
||||
* show node
|
||||
|
||||
Reference in New Issue
Block a user