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
|
||||
private _ctx!: CanvasRenderingContext2D
|
||||
|
||||
@Prop()
|
||||
private readonly sessionId!: string
|
||||
|
||||
@Prop()
|
||||
private readonly screenSize!: Dimension
|
||||
|
||||
@ -90,6 +93,9 @@
|
||||
|
||||
// draw cursors
|
||||
for (let { id, x, y } of this.cursors) {
|
||||
// ignore own cursor
|
||||
if (id == this.sessionId) continue
|
||||
|
||||
// get cursor position
|
||||
x = Math.round((x / this.screenSize.width) * width)
|
||||
y = Math.round((y / this.screenSize.height) * height)
|
||||
|
@ -3,7 +3,12 @@
|
||||
<div ref="container" class="neko-container">
|
||||
<video v-show="!screencast" ref="video" :autoplay="autoplay" :muted="autoplay" playsinline />
|
||||
<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
|
||||
:webrtc="connection.webrtc"
|
||||
:scroll="state.control.scroll"
|
||||
|
Loading…
Reference in New Issue
Block a user