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

@ -54,7 +54,7 @@
this.addFrameTile = null; this.addFrameTile = null;
this.createPreviews_(); this.createPreviews_();
} }
this.updatePreviews_(); this.updatePreviews_();
this.redrawFlag = false; this.redrawFlag = false;
} }
@ -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))
);
} }
} }
} }
@ -166,7 +172,7 @@
'</div><div class="label">Add new frame</div>'; '</div><div class="label">Add new frame</div>';
this.container.append(newFrameButton); this.container.append(newFrameButton);
this.addFrameTile = newFrameButton; this.addFrameTile = newFrameButton;
this.updateScrollerOverflows(); this.updateScrollerOverflows();
this.domInitialized = true; this.domInitialized = true;
}; };