fixed up drawBorder debug border for caching

This commit is contained in:
Eric Rowell
2014-03-26 23:11:46 -07:00
parent 06c14f29f1
commit c96b076932
5 changed files with 788 additions and 382 deletions

View File

@@ -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);