mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-06 10:20:26 +02:00
reload canvas on image load.
This commit is contained in:
parent
525efe17e7
commit
91c465eeca
1 changed files with 2 additions and 1 deletions
|
@ -127,6 +127,7 @@
|
||||||
|
|
||||||
this.webrtc.addListener('cursor-position', this.onCursorPosition)
|
this.webrtc.addListener('cursor-position', this.onCursorPosition)
|
||||||
this.webrtc.addListener('cursor-image', this.onCursorImage)
|
this.webrtc.addListener('cursor-image', this.onCursorImage)
|
||||||
|
this.cursorElement.onload = this.canvasRedraw
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
@ -134,6 +135,7 @@
|
||||||
|
|
||||||
this.webrtc.removeListener('cursor-position', this.onCursorPosition)
|
this.webrtc.removeListener('cursor-position', this.onCursorPosition)
|
||||||
this.webrtc.removeListener('cursor-image', this.onCursorImage)
|
this.webrtc.removeListener('cursor-image', this.onCursorImage)
|
||||||
|
this.cursorElement.onload = null
|
||||||
}
|
}
|
||||||
|
|
||||||
getMousePos(clientX: number, clientY: number) {
|
getMousePos(clientX: number, clientY: number) {
|
||||||
|
@ -280,7 +282,6 @@
|
||||||
|
|
||||||
if (!this.isControling) {
|
if (!this.isControling) {
|
||||||
this.cursorElement.src = data.uri
|
this.cursorElement.src = data.uri
|
||||||
this.canvasRedraw()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue