ascii resize block bug fix

This commit is contained in:
Hugh Bord 2021-04-03 13:49:22 +10:00
parent 077dbc0131
commit b516bcdfd3
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ pnpm-debug.log*
*.sln
*.sw?
deploy.sh
asciis/

View File

@ -269,14 +269,14 @@ export default {
if (!blocks[y]) {
blocks[y] = [];
for (let x = 0; x < canvasBlockWidth; x++) {
blocks[y][x] = emptyBlock;
blocks[y][x] = Object.assign({},emptyBlock);
}
} else {
// blocks[y]
// no new rows but new cols
for (let x = 0; x < canvasBlockWidth; x++) {
if (blocks[y] && !blocks[y][x]) {
blocks[y][x] = emptyBlock;
blocks[y][x] = Object.assign({},emptyBlock)
}
}
}