round cursors pixel position.

This commit is contained in:
Miroslav Šedivý 2021-02-12 17:28:58 +01:00
parent a1d755d6eb
commit 05176a2b31

View File

@ -284,8 +284,8 @@
this._ctx.clearRect(0, 0, width, height)
this._ctx.drawImage(
this.cursorElem,
(x / this.screenSize.width) * width - this.control.cursor.image.x,
(y / this.screenSize.height) * height - this.control.cursor.image.y,
Math.round((x / this.screenSize.width) * width - this.control.cursor.image.x),
Math.round((y / this.screenSize.height) * height - this.control.cursor.image.y),
this.control.cursor.image.width,
this.control.cursor.image.height,
)