Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/main/chat/phpfreechat/lib/javascript/mousepos.js

25 lines
491 B

function mousePosX(e) {
var posx = 0;
if (!e) var e = window.event;
if (e.pageX) {
posx = e.pageX;
}
else if (e.clientX) {
posx = e.clientX + document.body.scrollLeft
+ document.documentElement.scrollLeft;
}
return posx;
}
function mousePosY(e) {
var posy = 0;
if (!e) var e = window.event;
if (e.pageY) {
posy = e.pageY;
}
else if (e.clientY) {
posy = e.clientY + document.body.scrollTop
+ document.documentElement.scrollTop;
}
return posy;
}