mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-13 07:53:20 -05:00
Fixed RDP mouse wheel.
This commit is contained in:
parent
b6a33715b6
commit
78fa323394
@ -100,7 +100,10 @@
|
|||||||
if (self.mouseNagleTimer != null) { clearTimeout(self.mouseNagleTimer); self.mouseNagleTimer = null; }
|
if (self.mouseNagleTimer != null) { clearTimeout(self.mouseNagleTimer); self.mouseNagleTimer = null; }
|
||||||
var isHorizontal = false;
|
var isHorizontal = false;
|
||||||
var delta = e.detail;
|
var delta = e.detail;
|
||||||
var step = Math.round(Math.abs(delta) * 15 / 8);
|
//var step = Math.round(Math.abs(delta) * 15 / 8);
|
||||||
|
//var step = Math.abs(e.detail);
|
||||||
|
var step = 128;
|
||||||
|
//console.log('DOMMouseScroll', delta, step, e.detail);
|
||||||
var rect = e.target.getBoundingClientRect();
|
var rect = e.target.getBoundingClientRect();
|
||||||
self.socket.send(JSON.stringify(['wheel', e.clientX - rect.left, e.clientY - rect.top, step, delta > 0, isHorizontal]));
|
self.socket.send(JSON.stringify(['wheel', e.clientX - rect.left, e.clientY - rect.top, step, delta > 0, isHorizontal]));
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -111,7 +114,9 @@
|
|||||||
if (self.mouseNagleTimer != null) { clearTimeout(self.mouseNagleTimer); self.mouseNagleTimer = null; }
|
if (self.mouseNagleTimer != null) { clearTimeout(self.mouseNagleTimer); self.mouseNagleTimer = null; }
|
||||||
var isHorizontal = Math.abs(e.deltaX) > Math.abs(e.deltaY);
|
var isHorizontal = Math.abs(e.deltaX) > Math.abs(e.deltaY);
|
||||||
var delta = isHorizontal?e.deltaX:e.deltaY;
|
var delta = isHorizontal?e.deltaX:e.deltaY;
|
||||||
var step = Math.round(Math.abs(delta) * 15 / 8);
|
//var step = Math.round(Math.abs(delta) * 15 / 8);
|
||||||
|
var step = 128;
|
||||||
|
//console.log('mousewheel', delta, step, e);
|
||||||
var rect = e.target.getBoundingClientRect();
|
var rect = e.target.getBoundingClientRect();
|
||||||
self.socket.send(JSON.stringify(['wheel', e.clientX - rect.left, e.clientY - rect.top, step, delta > 0, isHorizontal]));
|
self.socket.send(JSON.stringify(['wheel', e.clientX - rect.left, e.clientY - rect.top, step, delta > 0, isHorizontal]));
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -86,7 +86,6 @@
|
|||||||
QV('main', false);
|
QV('main', false);
|
||||||
canvas.width = window.innerWidth;
|
canvas.width = window.innerWidth;
|
||||||
canvas.height = window.innerHeight;
|
canvas.height = window.innerHeight;
|
||||||
console.log('CanvasSize', canvas.width, canvas.height);
|
|
||||||
client.connect(urlargs.ws, domain, username, password, function (err) { QV('myCanvas', false); QV('main', true); });
|
client.connect(urlargs.ws, domain, username, password, function (err) { QV('myCanvas', false); QV('main', true); });
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user