mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add shared cursor as image tag.
This commit is contained in:
@ -101,11 +101,6 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
||||
this.emit('connection.disconnect', message)
|
||||
}
|
||||
|
||||
protected [EVENT.CURSOR_IMAGE]({ uri, width, height, x, y }: message.CursorImage) {
|
||||
this._log.debug('EVENT.CURSOR_IMAGE')
|
||||
Vue.set(this.state.control, 'cursor', { uri, width, height, x, y })
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
// Signal Events
|
||||
/////////////////////////////
|
||||
@ -180,6 +175,7 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
||||
Vue.set(this.state.screen, 'size', { width, height, rate })
|
||||
this.emit('room.screen.updated', width, height, rate)
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
// Clipboard Events
|
||||
/////////////////////////////
|
||||
@ -190,6 +186,20 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
||||
this.emit('room.clipboard.updated', text)
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
// Cursor Events
|
||||
/////////////////////////////
|
||||
|
||||
protected [EVENT.CURSOR_IMAGE]({ uri, width, height, x, y }: message.CursorImage) {
|
||||
this._log.debug('EVENT.CURSOR_IMAGE')
|
||||
Vue.set(this.state.control.cursor, 'image', { uri, width, height, x, y })
|
||||
}
|
||||
|
||||
protected [EVENT.CURSOR_POSITION]({ x, y }: message.CursorPosition) {
|
||||
this._log.debug('EVENT.CURSOR_IMAGE')
|
||||
Vue.set(this.state.control.cursor, 'position', { x, y })
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
// Broadcast Events
|
||||
/////////////////////////////
|
||||
|
Reference in New Issue
Block a user