Fixed canvas undoing bug

This commit is contained in:
unsettledgames
2020-09-27 11:25:09 +02:00
parent 4223597659
commit c2bf2fe131
4 changed files with 32 additions and 22 deletions

View File

@@ -47,9 +47,9 @@ function HistoryStateResizeCanvas(newSize, oldSize, imageDatas) {
// Resizing the canvas
resizeCanvas(null, oldSize);
// Putting the image datas
for (let i=0; i<imageDatas.length; i++) {
for (let i=0; i<layers.length; i++) {
if (layers[i].menuEntry != null) {
layers[i].context.putImageData(imageDatas[dataIndex], 0, 0);
layers[i].context.putImageData(this.imageDatas[dataIndex], 0, 0);
dataIndex++;
}
}