Fixbrushhistory (#9)

* fix brush history redraw, clearRect use right width heights

* fix brush history redraw, clearRect user proper width heights
This commit is contained in:
Fred Akers 2021-08-07 19:42:05 -04:00 提交者 GitHub
父節點 e43f564e8c
當前提交 1bcfedaf28
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 2 個檔案被更改,包括 2 行新增4 行删除

查看文件

@ -144,7 +144,7 @@ export default {
return filterNullBlocks(blocks)
},
drawPreview() {
this.ctx.clearRect(0, 0, this.canvasName.width, this.canvasName.height);
this.ctx.clearRect(0, 0, this.$refs[this.canvasName].width, this.$refs[this.canvasName].height);
this.ctx.fillStyle = this.mircColours[1];
const BLOCK_WIDTH = this.currentAscii.blockWidth;

查看文件

@ -154,7 +154,7 @@ export default {
return filterNullBlocks(blocks);
},
drawPreview() {
this.ctx.clearRect(0, 0, 10000, 10000);
this.ctx.clearRect(0, 0, this.$refs.brushcanvas.width, this.$refs.brushcanvas.height);
this.ctx.fillStyle = this.mircColours[1];
const BLOCK_WIDTH = this.currentAscii.blockWidth;
@ -200,8 +200,6 @@ export default {
}
}
}
this.ctx.stroke();
}
},
delayRedrawCanvas() {