rename to wsControl.

This commit is contained in:
Miroslav Šedivý 2022-07-23 14:06:47 +02:00
parent 84708c77d2
commit 56b7c8087d
2 changed files with 12 additions and 12 deletions

View File

@ -22,7 +22,7 @@
<neko-overlay <neko-overlay
v-show="!private_mode_enabled && connected" v-show="!private_mode_enabled && connected"
:style="{ pointerEvents: state.control.locked ? 'none' : 'auto' }" :style="{ pointerEvents: state.control.locked ? 'none' : 'auto' }"
:control="control" :wsControl="control"
:sessions="state.sessions" :sessions="state.sessions"
:hostId="state.control.host_id" :hostId="state.control.host_id"
:webrtc="connection.webrtc" :webrtc="connection.webrtc"

View File

@ -5,8 +5,8 @@
ref="textarea" ref="textarea"
class="neko-overlay" class="neko-overlay"
:style="{ cursor }" :style="{ cursor }"
@click.stop.prevent="control.emit('overlay.click', $event)" @click.stop.prevent="wsControl.emit('overlay.click', $event)"
@contextmenu.stop.prevent="control.emit('overlay.contextmenu', $event)" @contextmenu.stop.prevent="wsControl.emit('overlay.contextmenu', $event)"
@input.stop.prevent="onInput" @input.stop.prevent="onInput"
@wheel.stop.prevent="onWheel" @wheel.stop.prevent="onWheel"
@mousemove.stop.prevent="onMouseMove" @mousemove.stop.prevent="onMouseMove"
@ -74,7 +74,7 @@
private focused = false private focused = false
@Prop() @Prop()
private readonly control!: NekoControl private readonly wsControl!: NekoControl
@Prop() @Prop()
private readonly sessions!: Record<string, Session> private readonly sessions!: Record<string, Session>
@ -153,7 +153,7 @@
if (this.webrtc.connected) { if (this.webrtc.connected) {
this.webrtc.send('keydown', { key }) this.webrtc.send('keydown', { key })
} else { } else {
this.control.keyDown(key) this.wsControl.keyDown(key)
} }
return isCtrlKey return isCtrlKey
@ -172,7 +172,7 @@
if (this.webrtc.connected) { if (this.webrtc.connected) {
this.webrtc.send('keyup', { key }) this.webrtc.send('keyup', { key })
} else { } else {
this.control.keyUp(key) this.wsControl.keyUp(key)
} }
} }
this.keyboard.listenTo(this._textarea) this.keyboard.listenTo(this._textarea)
@ -244,7 +244,7 @@
} }
onInput(e: InputEvent) { onInput(e: InputEvent) {
this.control.paste(this._textarea.value) this.wsControl.paste(this._textarea.value)
this._textarea.value = '' this._textarea.value = ''
} }
@ -306,7 +306,7 @@
this.sendMousePos(e) this.sendMousePos(e)
this.webrtc.send('wheel', { x, y }) this.webrtc.send('wheel', { x, y })
} else { } else {
this.control.scroll(x, y) this.wsControl.scroll(x, y)
} }
} }
@ -332,7 +332,7 @@
this.webrtc.send('mousedown', { key }) this.webrtc.send('mousedown', { key })
} else { } else {
const { x, y } = this.getMousePos(e.clientX, e.clientY) const { x, y } = this.getMousePos(e.clientX, e.clientY)
this.control.buttonDown(key, x, y) this.wsControl.buttonDown(key, x, y)
} }
} }
@ -348,7 +348,7 @@
this.webrtc.send('mouseup', { key }) this.webrtc.send('mouseup', { key })
} else { } else {
const { x, y } = this.getMousePos(e.clientX, e.clientY) const { x, y } = this.getMousePos(e.clientX, e.clientY)
this.control.buttonUp(key, x, y) this.wsControl.buttonUp(key, x, y)
} }
} }
@ -588,7 +588,7 @@
implicitControlRequest(e: MouseEvent) { implicitControlRequest(e: MouseEvent) {
if (this.implicitControl && e.type === 'mousedown' && this.reqMouseDown == null) { if (this.implicitControl && e.type === 'mousedown' && this.reqMouseDown == null) {
this.reqMouseDown = e this.reqMouseDown = e
this.control.request() this.wsControl.request()
} }
if (this.implicitControl && e.type === 'mouseup' && this.reqMouseUp == null) { if (this.implicitControl && e.type === 'mouseup' && this.reqMouseUp == null) {
@ -599,7 +599,7 @@
// unused // unused
implicitControlRelease() { implicitControlRelease() {
if (this.implicitControl) { if (this.implicitControl) {
this.control.release() this.wsControl.release()
} }
} }
} }