diff options
author | Devaev Maxim <[email protected]> | 2019-12-10 05:53:29 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-12-10 05:53:29 +0300 |
commit | f5a6fe35a99735c11eaad5d194061223bf9a0820 (patch) | |
tree | 5459afdd2856a4f9917d5f6c4aa95eb95300513c /web/share/js/kvm/mouse.js | |
parent | 3048fc79233f1ece909dee0f100e72a2f3f5a639 (diff) |
ws api refactoring
Diffstat (limited to 'web/share/js/kvm/mouse.js')
-rw-r--r-- | web/share/js/kvm/mouse.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js index 3b5da1de..1b8aa716 100644 --- a/web/share/js/kvm/mouse.js +++ b/web/share/js/kvm/mouse.js @@ -147,9 +147,8 @@ export function Mouse() { __sendMove(); if (__ws) { __ws.send(JSON.stringify({ - event_type: "mouse_button", - button: button, - state: state, + "event_type": "mouse_button", + "event": {"button": button, "state": state}, })); } }; @@ -166,8 +165,8 @@ export function Mouse() { tools.debug("Mouse: moved:", to); if (__ws) { __ws.send(JSON.stringify({ - event_type: "mouse_move", - to: to, + "event_type": "mouse_move", + "event": {"to": to}, })); } __sent_pos = pos; @@ -202,8 +201,8 @@ export function Mouse() { tools.debug("Mouse: scrolled:", delta); if (__ws) { __ws.send(JSON.stringify({ - event_type: "mouse_wheel", - delta: delta, + "event_type": "mouse_wheel", + "event": {"delta": delta}, })); } } |