diff --git a/src/component/cursors.vue b/src/component/cursors.vue index dfce399c..d2261bf1 100644 --- a/src/component/cursors.vue +++ b/src/component/cursors.vue @@ -213,7 +213,7 @@ canvasDrawCursor(x: number, y: number, id: string) { // get intrinsic dimensions - let { width, height } = this.canvasSize + const { width, height } = this.canvasSize x = Math.round((x / this.screenSize.width) * width) y = Math.round((y / this.screenSize.height) * height) @@ -246,7 +246,7 @@ // reset transformation, X and Y will be 0 again this._ctx.setTransform(this.canvasScale, 0, 0, this.canvasScale, 0, 0) - const { width, height } = this._overlay + const { width, height } = this.canvasSize this._ctx.clearRect(0, 0, width, height) } } diff --git a/src/component/overlay.vue b/src/component/overlay.vue index fc3270ca..7a2b7a1c 100644 --- a/src/component/overlay.vue +++ b/src/component/overlay.vue @@ -572,7 +572,7 @@ if (this.cursorImage.width <= 1 && this.cursorImage.height <= 1) return // get intrinsic dimensions - let { width, height } = this.canvasSize + const { width, height } = this.canvasSize // reset transformation, X and Y will be 0 again this._ctx.setTransform(this.canvasScale, 0, 0, this.canvasScale, 0, 0) @@ -619,7 +619,7 @@ // reset transformation, X and Y will be 0 again this._ctx.setTransform(this.canvasScale, 0, 0, this.canvasScale, 0, 0) - const { width, height } = this._overlay + const { width, height } = this.canvasSize this._ctx.clearRect(0, 0, width, height) }