From 74b7f93ddb2ff2902757ef8c13bab5f06a7fc2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Szab=C3=B3?= Date: Wed, 31 Aug 2016 16:09:01 +0200 Subject: [PATCH] Fix code style errors --- src/js/controller/FramesListController.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/js/controller/FramesListController.js b/src/js/controller/FramesListController.js index bbd808bf..7d7f0e1f 100644 --- a/src/js/controller/FramesListController.js +++ b/src/js/controller/FramesListController.js @@ -54,7 +54,7 @@ this.addFrameTile = null; this.createPreviews_(); } - + this.updatePreviews_(); this.redrawFlag = false; } @@ -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)) + ); } } } @@ -166,7 +172,7 @@ '
Add new frame
'; this.container.append(newFrameButton); this.addFrameTile = newFrameButton; - + this.updateScrollerOverflows(); this.domInitialized = true; };