mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
canvas cursor draw, reset x & y before clear #9.
This commit is contained in:
parent
a6abe0aac6
commit
abb28b1d10
@ -233,6 +233,9 @@
|
||||
}
|
||||
|
||||
canvasClear() {
|
||||
// reset transformation, X and Y will be 0 again
|
||||
this._ctx.setTransform(CANVAS_SCALE, 0, 0, CANVAS_SCALE, 0, 0)
|
||||
|
||||
const { width, height } = this._overlay
|
||||
this._ctx.clearRect(0, 0, width, height)
|
||||
}
|
||||
|
@ -559,6 +559,9 @@
|
||||
}
|
||||
|
||||
canvasClear() {
|
||||
// reset transformation, X and Y will be 0 again
|
||||
this._ctx.setTransform(CANVAS_SCALE, 0, 0, CANVAS_SCALE, 0, 0)
|
||||
|
||||
const { width, height } = this._overlay
|
||||
this._ctx.clearRect(0, 0, width, height)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user