Transmit mouse position info
This commit is contained in:
parent
0c38e8213c
commit
c9f11aa285
|
@ -5,6 +5,19 @@ const nodes = {};
|
|||
|
||||
let socket = null;
|
||||
|
||||
const mouseEvents = {
|
||||
click: true,
|
||||
dblclick: true,
|
||||
mousedown: true,
|
||||
mouseenter: true,
|
||||
mouseleave: true,
|
||||
mousemove: true,
|
||||
mouseout: true,
|
||||
mouseover: true,
|
||||
mouseup: true,
|
||||
wheel: true,
|
||||
};
|
||||
|
||||
function ooui (rootElementPath) {
|
||||
var opened = false;
|
||||
|
||||
|
@ -115,6 +128,12 @@ function msgListen (m) {
|
|||
node.checked :
|
||||
node.value;
|
||||
}
|
||||
else if (mouseEvents[m.k]) {
|
||||
em.v = {
|
||||
offsetX: e.offsetX,
|
||||
offsetY: e.offsetY,
|
||||
};
|
||||
}
|
||||
const ems = JSON.stringify (em);
|
||||
socket.send (ems);
|
||||
if (debug) console.log ("Event", em);
|
||||
|
|
Loading…
Reference in New Issue