Fix code style errors

This commit is contained in:
Dávid Szabó 2016-08-31 16:09:01 +02:00 committed by Julian Descottes
parent fb97533cc9
commit 74b7f93ddb

View File

@ -125,11 +125,17 @@
this.tiles[i].querySelector('.tile-count').innerHTML = (i + 1);
// Check if any tile is updated
if (this.tiles[i].getAttribute('data-tile-hash') !== this.piskelController.getCurrentLayer().getFrameAt(i).getHash()) {
var hash = this.piskelController.getCurrentLayer().getFrameAt(i).getHash();
if (this.tiles[i].getAttribute('data-tile-hash') !== hash) {
if (this.tiles[i].querySelector('canvas')) {
this.tiles[i].querySelector('.canvas-container').replaceChild(this.getCanvasForFrame(this.piskelController.getCurrentLayer().getFrameAt(i)), this.tiles[i].querySelector('canvas'));
this.tiles[i].querySelector('.canvas-container').replaceChild(
this.getCanvasForFrame(this.piskelController.getCurrentLayer().getFrameAt(i)),
this.tiles[i].querySelector('canvas')
);
} else {
this.tiles[i].querySelector('.canvas-container').appendChild(this.getCanvasForFrame(this.piskelController.getCurrentLayer().getFrameAt(i)));
this.tiles[i].querySelector('.canvas-container').appendChild(
this.getCanvasForFrame(this.piskelController.getCurrentLayer().getFrameAt(i))
);
}
}
}