mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
inactive cursors ignore own cursor.
This commit is contained in:
parent
0480a0d512
commit
cd8d0da96a
@ -28,6 +28,9 @@
|
|||||||
@Ref('overlay') readonly _overlay!: HTMLCanvasElement
|
@Ref('overlay') readonly _overlay!: HTMLCanvasElement
|
||||||
private _ctx!: CanvasRenderingContext2D
|
private _ctx!: CanvasRenderingContext2D
|
||||||
|
|
||||||
|
@Prop()
|
||||||
|
private readonly sessionId!: string
|
||||||
|
|
||||||
@Prop()
|
@Prop()
|
||||||
private readonly screenSize!: Dimension
|
private readonly screenSize!: Dimension
|
||||||
|
|
||||||
@ -90,6 +93,9 @@
|
|||||||
|
|
||||||
// draw cursors
|
// draw cursors
|
||||||
for (let { id, x, y } of this.cursors) {
|
for (let { id, x, y } of this.cursors) {
|
||||||
|
// ignore own cursor
|
||||||
|
if (id == this.sessionId) continue
|
||||||
|
|
||||||
// get cursor position
|
// get cursor position
|
||||||
x = Math.round((x / this.screenSize.width) * width)
|
x = Math.round((x / this.screenSize.width) * width)
|
||||||
y = Math.round((y / this.screenSize.height) * height)
|
y = Math.round((y / this.screenSize.height) * height)
|
||||||
|
@ -3,7 +3,12 @@
|
|||||||
<div ref="container" class="neko-container">
|
<div ref="container" class="neko-container">
|
||||||
<video v-show="!screencast" ref="video" :autoplay="autoplay" :muted="autoplay" playsinline />
|
<video v-show="!screencast" ref="video" :autoplay="autoplay" :muted="autoplay" playsinline />
|
||||||
<neko-screencast v-show="screencast" :enabled="screencast" :api="api.room" />
|
<neko-screencast v-show="screencast" :enabled="screencast" :api="api.room" />
|
||||||
<neko-cursors :screenSize="state.screen.size" :canvasSize="canvasSize" :cursors="state.cursors" />
|
<neko-cursors
|
||||||
|
:sessionId="state.session_id"
|
||||||
|
:screenSize="state.screen.size"
|
||||||
|
:canvasSize="canvasSize"
|
||||||
|
:cursors="state.cursors"
|
||||||
|
/>
|
||||||
<neko-overlay
|
<neko-overlay
|
||||||
:webrtc="connection.webrtc"
|
:webrtc="connection.webrtc"
|
||||||
:scroll="state.control.scroll"
|
:scroll="state.control.scroll"
|
||||||
|
Loading…
Reference in New Issue
Block a user