better caching if node not in layer

This commit is contained in:
Лаврёнов Антон
2014-05-11 20:22:30 +08:00
parent f99975441e
commit 917ca5bc56
3 changed files with 42 additions and 22 deletions

View File

@@ -199,7 +199,7 @@
hitContext.translate(x * -1, y * -1);
// don't need to translate canvas if shape is not added to layer
if (this.nodeType === 'Shape' && layer) {
if (this.nodeType === 'Shape') {
sceneContext.translate(this.x() * -1, this.y() * -1);
hitContext.translate(this.x() * -1, this.y() * -1);
}