From 91c465eeca04934f44a9a45c7631a7a37e95525f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 17 Feb 2021 21:54:15 +0100 Subject: [PATCH] reload canvas on image load. --- src/component/overlay.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/component/overlay.vue b/src/component/overlay.vue index 01baa51c..b2a043b2 100644 --- a/src/component/overlay.vue +++ b/src/component/overlay.vue @@ -127,6 +127,7 @@ this.webrtc.addListener('cursor-position', this.onCursorPosition) this.webrtc.addListener('cursor-image', this.onCursorImage) + this.cursorElement.onload = this.canvasRedraw } beforeDestroy() { @@ -134,6 +135,7 @@ this.webrtc.removeListener('cursor-position', this.onCursorPosition) this.webrtc.removeListener('cursor-image', this.onCursorImage) + this.cursorElement.onload = null } getMousePos(clientX: number, clientY: number) { @@ -280,7 +282,6 @@ if (!this.isControling) { this.cursorElement.src = data.uri - this.canvasRedraw() } }