firefox bugfix, mousemove no longer crashes js on client
This commit is contained in:
parent
b77e986a16
commit
515d949f75
|
@ -138,14 +138,14 @@ IFaceButtons.prototype.draw = function() {
|
|||
IFaceButtons.prototype.mousemove = function(event) {
|
||||
for (var i =0; i < this.buttons.length; i++) {
|
||||
var b = this.buttons[i];
|
||||
b.isHover = b.isHovered(event.offsetX, event.offsetY);
|
||||
b.isHover = b.isHovered(event.clientX, event.clientY);
|
||||
}
|
||||
};
|
||||
|
||||
IFaceButtons.prototype.mouseclick = function(event) {
|
||||
for (var i =0; i < this.buttons.length; i++) {
|
||||
var b = this.buttons[i];
|
||||
if (b.isHovered(event.offsetX, event.offsetY))
|
||||
if (b.isHovered(event.clientX, event.clientY))
|
||||
b.execute();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -115,8 +115,8 @@ Pamela.prototype.start = function() {
|
|||
|
||||
Pamela.prototype.mousemove = function(event) {
|
||||
this.buttons.mousemove(event);
|
||||
this.mouse.x = event.offsetX;
|
||||
this.mouse.y = event.offsetY;
|
||||
this.mouse.x = event.clientX;
|
||||
this.mouse.y = event.clientY;
|
||||
};
|
||||
|
||||
Pamela.prototype.mouseclick = function(event) {
|
||||
|
@ -195,7 +195,7 @@ Pamela.prototype.updateEntries = function() {
|
|||
$.getJSON("macs.php", function(data) {
|
||||
self.updateNodes(data);
|
||||
});
|
||||
self.entriesTimer = setTimeout(function() { self.updateEntries(); }, 60000);
|
||||
self.entriesTimer = setTimeout(function() { self.updateEntries(); }, 20000);
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user