mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 06:35:54 -05:00
Added Intel AMT mouse wheel support.
This commit is contained in:
parent
88877ab454
commit
a0a4582253
@ -884,6 +884,8 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
|
|||||||
c.onmouseup = obj.mouseup;
|
c.onmouseup = obj.mouseup;
|
||||||
c.onmousedown = obj.mousedown;
|
c.onmousedown = obj.mousedown;
|
||||||
c.onmousemove = obj.mousemove;
|
c.onmousemove = obj.mousemove;
|
||||||
|
//c.onmousewheel = obj.mousewheel;
|
||||||
|
c.onwheel = obj.mousewheel;
|
||||||
//if (navigator.userAgent.match(/mozilla/i)) c.DOMMouseScroll = obj.xxDOMMouseScroll; else c.onmousewheel = obj.xxMouseWheel;
|
//if (navigator.userAgent.match(/mozilla/i)) c.DOMMouseScroll = obj.xxDOMMouseScroll; else c.onmousewheel = obj.xxMouseWheel;
|
||||||
_MouseInputGrab = true;
|
_MouseInputGrab = true;
|
||||||
}
|
}
|
||||||
@ -894,6 +896,8 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
|
|||||||
c.onmousemove = null;
|
c.onmousemove = null;
|
||||||
c.onmouseup = null;
|
c.onmouseup = null;
|
||||||
c.onmousedown = null;
|
c.onmousedown = null;
|
||||||
|
//c.onmousewheel = null;
|
||||||
|
c.onwheel = null;
|
||||||
//if (navigator.userAgent.match(/mozilla/i)) c.DOMMouseScroll = null; else c.onmousewheel = null;
|
//if (navigator.userAgent.match(/mozilla/i)) c.DOMMouseScroll = null; else c.onmousewheel = null;
|
||||||
_MouseInputGrab = false;
|
_MouseInputGrab = false;
|
||||||
}
|
}
|
||||||
@ -921,6 +925,18 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
|
|||||||
|
|
||||||
// RFB 'PointerEvent' and mouse handlers
|
// RFB 'PointerEvent' and mouse handlers
|
||||||
obj.mousedblclick = function (e) { }
|
obj.mousedblclick = function (e) { }
|
||||||
|
obj.mousewheel = function (e) {
|
||||||
|
var v = 0;
|
||||||
|
if (typeof e.deltaY == 'number') { v = -1 * e.deltaY; }
|
||||||
|
else if (typeof e.detail == 'number') { v = -1 * e.detail; }
|
||||||
|
else if (typeof e.wheelDelta == 'number') { v = e.wheelDelta; }
|
||||||
|
if (v == 0) return;
|
||||||
|
var tmpmask = obj.buttonmask;
|
||||||
|
obj.buttonmask |= (1 << ((v > 0) ? 3 : 4));
|
||||||
|
obj.mousemove(e, 1);
|
||||||
|
obj.buttonmask = tmpmask;
|
||||||
|
return obj.mousemove(e, 1);
|
||||||
|
}
|
||||||
obj.mousedown = function (e) { obj.buttonmask |= (1 << e.button); return obj.mousemove(e, 1); }
|
obj.mousedown = function (e) { obj.buttonmask |= (1 << e.button); return obj.mousemove(e, 1); }
|
||||||
obj.mouseup = function (e) { obj.buttonmask &= (0xFFFF - (1 << e.button)); return obj.mousemove(e, 1); }
|
obj.mouseup = function (e) { obj.buttonmask &= (0xFFFF - (1 << e.button)); return obj.mousemove(e, 1); }
|
||||||
obj.mousemove = function (e, force) {
|
obj.mousemove = function (e, force) {
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user