mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
cancel if no cursors to animate.
This commit is contained in:
parent
6afa3c68de
commit
5b34f906c6
@ -127,9 +127,17 @@
|
|||||||
this._points.push(pos)
|
this._points.push(pos)
|
||||||
}
|
}
|
||||||
|
|
||||||
const startAnimation = this._percent > 1 || this._percent == 0
|
// no cursors to animate
|
||||||
|
if (this._points.length == 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// start animation if not running
|
||||||
|
const percent = this._percent
|
||||||
this._percent = 0
|
this._percent = 0
|
||||||
if (startAnimation) this.canvasAnimate()
|
if (percent > 1 || percent == 0) {
|
||||||
|
this.canvasAnimate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
canvasRedraw(x: number, y: number, id: string) {
|
canvasRedraw(x: number, y: number, id: string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user