From d46bc3dfd187a0d354798f766852e5ea69de3084 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Wed, 1 Aug 2018 00:26:39 +0300 Subject: pretty stream stub --- kvmd/web/js/mouse.js | 12 ++++++------ kvmd/web/js/stream.js | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'kvmd/web/js') diff --git a/kvmd/web/js/mouse.js b/kvmd/web/js/mouse.js index 3195582c..b9d27e67 100644 --- a/kvmd/web/js/mouse.js +++ b/kvmd/web/js/mouse.js @@ -4,12 +4,12 @@ var mouse = new function() { var __sent_pos = {x: 0, y:0}; this.init = function() { - el_stream_image = $("stream-image"); - el_stream_image.onmousedown = (event) => __buttonHandler(event, true); - el_stream_image.onmouseup = (event) => __buttonHandler(event, false); - el_stream_image.oncontextmenu = (event) => event.preventDefault(); - el_stream_image.onmousemove = __moveHandler; - el_stream_image.onwheel = (event) => __wheelHandler(event); + el_stream_box = $("stream-box"); + el_stream_box.onmousedown = (event) => __buttonHandler(event, true); + el_stream_box.onmouseup = (event) => __buttonHandler(event, false); + el_stream_box.oncontextmenu = (event) => event.preventDefault(); + el_stream_box.onmousemove = __moveHandler; + el_stream_box.onwheel = (event) => __wheelHandler(event); setInterval(__sendMove, 100); }; diff --git a/kvmd/web/js/stream.js b/kvmd/web/js/stream.js index feb05d13..51e00a96 100644 --- a/kvmd/web/js/stream.js +++ b/kvmd/web/js/stream.js @@ -11,12 +11,14 @@ var stream = new function() { tools.info("Refreshing stream ..."); __prev_state = false; $("stream-image").className = "stream-image-inactive"; + $("stream-box").className = "stream-box-inactive"; $("stream-led").className = "led-off"; $("stream-reset-button").disabled = true; } else if (!__prev_state) { __refreshImage(); __prev_state = true; $("stream-image").className = "stream-image-active"; + $("stream-box").className = "stream-box-active"; $("stream-led").className = "led-on"; $("stream-reset-button").disabled = false; } -- cgit v1.2.3