mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix code style errors
This commit is contained in:
parent
fb97533cc9
commit
74b7f93ddb
@ -125,11 +125,17 @@
|
|||||||
this.tiles[i].querySelector('.tile-count').innerHTML = (i + 1);
|
this.tiles[i].querySelector('.tile-count').innerHTML = (i + 1);
|
||||||
|
|
||||||
// Check if any tile is updated
|
// 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')) {
|
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 {
|
} 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))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user