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
@ -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;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user