mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 14:45:52 -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; }
|
||||
var isHorizontal = false;
|
||||
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();
|
||||
self.socket.send(JSON.stringify(['wheel', e.clientX - rect.left, e.clientY - rect.top, step, delta > 0, isHorizontal]));
|
||||
e.preventDefault();
|
||||
@ -111,7 +114,9 @@
|
||||
if (self.mouseNagleTimer != null) { clearTimeout(self.mouseNagleTimer); self.mouseNagleTimer = null; }
|
||||
var isHorizontal = Math.abs(e.deltaX) > Math.abs(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();
|
||||
self.socket.send(JSON.stringify(['wheel', e.clientX - rect.left, e.clientY - rect.top, step, delta > 0, isHorizontal]));
|
||||
e.preventDefault();
|
||||
|
@ -86,7 +86,6 @@
|
||||
QV('main', false);
|
||||
canvas.width = window.innerWidth;
|
||||
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); });
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user