diff options
author | Devaev Maxim <[email protected]> | 2018-11-27 12:05:38 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-11-27 12:05:38 +0300 |
commit | 1897d72b5191ba88130f99feec302ea95b4ce6cd (patch) | |
tree | 39b235ae1182aca7fd667577868a65ba9dc9f6b8 /web/js/kvm/mouse.js | |
parent | b5ca09f310ade56ead145db4aee892d50cfd6386 (diff) |
refactoring
Diffstat (limited to 'web/js/kvm/mouse.js')
-rw-r--r-- | web/js/kvm/mouse.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/web/js/kvm/mouse.js b/web/js/kvm/mouse.js index 9f93a659..58e46d15 100644 --- a/web/js/kvm/mouse.js +++ b/web/js/kvm/mouse.js @@ -21,8 +21,8 @@ function Mouse() { $("stream-box").oncontextmenu = (event) => event.preventDefault(); $("stream-box").onmousemove = __moveHandler; $("stream-box").onwheel = __wheelHandler; - $("stream-box").ontouchstart = (event) => __touchMoveHandler(event); + Array.prototype.forEach.call(document.querySelectorAll("[data-mouse-button]"), function(el_button) { var button = el_button.getAttribute("data-mouse-button"); tools.setOnDown(el_button, () => __sendButton(button, true)); @@ -115,6 +115,7 @@ function Mouse() { x: __translate(pos.x, 0, el_stream_image.clientWidth, -32768, 32767), y: __translate(pos.y, 0, el_stream_image.clientHeight, -32768, 32767), }; + tools.debug("Mouse: moved:", to); if (__ws) { __ws.send(JSON.stringify({ |