cursor image as WS event.

This commit is contained in:
Miroslav Šedivý
2021-01-10 12:34:08 +01:00
parent 94186f3ef6
commit 818e07fc8b
5 changed files with 24 additions and 12 deletions

View File

@ -81,14 +81,9 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
// TODO: Handle.
}
// TODO: Refactor.
protected ['cursor/image']({ payload }: any) {
console.log('cursor/image')
Vue.set(this.state.control, 'cursor', {
uri: payload.Uri,
hot_x: payload.Xhot,
hot_y: payload.Yhot,
})
protected [EVENT.CURSOR_IMAGE]({ uri, width, height, x, y }: message.CursorImage) {
console.log('EVENT.CURSOR_IMAGE')
Vue.set(this.state.control, 'cursor', { uri, width, height, x, y })
}
/////////////////////////////