fix:signature line cap

This commit is contained in:
黄云飞
2022-09-09 09:08:12 +08:00
parent a9d6601207
commit 34529feaca
+1 -2
View File
@@ -41,6 +41,7 @@ export class Signature {
this.trashContainer = trashContainer
this.canvas = canvas
this.ctx = <CanvasRenderingContext2D>canvas.getContext('2d')
this.ctx.lineCap = 'round'
this._bindEvent()
}
@@ -156,8 +157,6 @@ export class Signature {
this.x = evt.offsetX
this.y = evt.offsetY
this.ctx.lineWidth = 5
this.ctx.lineCap = 'butt'
this.ctx.lineJoin = 'round'
}
private _draw(evt: MouseEvent) {