mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Fix ticket #114 - mouse position calculated incorrectly.
This commit is contained in:
@@ -111,10 +111,13 @@ Guacamole.Mouse = function(element) {
|
|||||||
// This is all JUST so we can get the mouse position within the element
|
// This is all JUST so we can get the mouse position within the element
|
||||||
var parent = element.offsetParent;
|
var parent = element.offsetParent;
|
||||||
while (parent) {
|
while (parent) {
|
||||||
if (parent.offsetLeft && parent.offsetTop) {
|
|
||||||
|
if (parent.offsetLeft)
|
||||||
guac_mouse.currentState.x -= parent.offsetLeft;
|
guac_mouse.currentState.x -= parent.offsetLeft;
|
||||||
|
|
||||||
|
if (parent.offsetTop)
|
||||||
guac_mouse.currentState.y -= parent.offsetTop;
|
guac_mouse.currentState.y -= parent.offsetTop;
|
||||||
}
|
|
||||||
parent = parent.offsetParent;
|
parent = parent.offsetParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user