mirror of
https://github.com/konvajs/konva.git
synced 2025-12-17 09:54:56 +08:00
fixed up drawBorder debug border for caching
This commit is contained in:
16
src/Node.js
16
src/Node.js
@@ -180,14 +180,6 @@
|
||||
sceneContext.save();
|
||||
hitContext.save();
|
||||
|
||||
sceneContext.translate(x * -1, y * -1);
|
||||
hitContext.translate(x * -1, y * -1);
|
||||
|
||||
if (this.nodeType === 'Shape') {
|
||||
sceneContext.translate(this.x() * -1, this.y() * -1);
|
||||
hitContext.translate(this.x() * -1, this.y() * -1);
|
||||
}
|
||||
|
||||
// this will draw a red border around the cached box for
|
||||
// debugging purposes
|
||||
if (drawBorder) {
|
||||
@@ -201,6 +193,14 @@
|
||||
sceneContext.restore();
|
||||
}
|
||||
|
||||
sceneContext.translate(x * -1, y * -1);
|
||||
hitContext.translate(x * -1, y * -1);
|
||||
|
||||
if (this.nodeType === 'Shape') {
|
||||
sceneContext.translate(this.x() * -1, this.y() * -1);
|
||||
hitContext.translate(this.x() * -1, this.y() * -1);
|
||||
}
|
||||
|
||||
this.drawScene(cachedSceneCanvas, this);
|
||||
this.drawHit(cachedHitCanvas, this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user