fix: drawing size error when browser scale page #594

This commit is contained in:
Hufe921
2024-05-25 18:30:46 +08:00
parent b8323c0d8a
commit 7fa58f8290
+6 -1
View File
@@ -2131,7 +2131,12 @@ export class Draw {
private _clearPage(pageNo: number) {
const ctx = this.ctxList[pageNo]
const pageDom = this.pageList[pageNo]
ctx.clearRect(0, 0, pageDom.width, pageDom.height)
ctx.clearRect(
0,
0,
Math.max(pageDom.width, this.getWidth()),
Math.max(pageDom.height, this.getHeight())
)
this.blockParticle.clear()
}