fixed red/grey block bug

This commit is contained in:
Hugh Bord 2021-03-27 14:24:05 +10:00
父節點 848b606b38
當前提交 39c386b834
共有 2 個檔案被更改,包括 6 行新增12 行删除

查看文件

@ -245,13 +245,6 @@ export default {
char: null,
};
// Object clone this to reset the block state
let emptyCurBlock = {
fg: null,
bg: null,
char: null,
};
// set asciiImport as the entire file contents as a string
this.asciiImport = contents.split("\u0003\u0003").join("\u0003");
@ -376,7 +369,9 @@ export default {
if (
!isNaN(colorChar1) &&
!isNaN(colorChar2) &&
parseInt(colorChar2) > parseInt(colorChar1)
parseInt(colorChar2) > parseInt(colorChar1) &&
parseInt(parsedColor) <= 10
) {
parsedColor = parseInt(colorChar2);
asciiStringArray.shift();

查看文件

@ -170,10 +170,6 @@ export default {
this.currentAsciibirdMeta.blocks[y] &&
this.currentAsciibirdMeta.blocks[y][x]
) {
// curBlock = JSON.parse(
// JSON.stringify(this.currentAsciibirdMeta.blocks[y][x])
// );
curBlock = Object.assign(curBlock,this.currentAsciibirdMeta.blocks[y][x])
canvasX = BLOCK_WIDTH * x;
@ -368,6 +364,9 @@ export default {
}, 8);
}
},
// TOOLS
fillTool() {
let fillStartBlock = this.currentAsciibirdMeta.blocks[this.y][this.x];