You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think getMousePos() in wgo.js is incorrect.
(wgo.js (line: 1151))
e.layerX, e.layerY get negative values or huge values, depended on browser expansion rate and element width.
It may be bug.
thanks
The text was updated successfully, but these errors were encountered:
var getMousePos = function(e) {
// new hopefully better translation of coordinates
var element = this.element, offsetX = 0, offsetY = 0;
if (element.offsetParent) {
do {
offsetX += element.offsetLeft;
offsetY += element.offsetTop;
} while ((element = element.offsetParent));
}
var mx = e.pageX - offsetX;
var my = e.pageY - offsetY
var x, y;
x = mx * this.pixelRatio;
x -= this.left;
x /= this.fieldWidth;
x = Math.round(x);
y = my * this.pixelRatio;
y -= this.top;
y /= this.fieldHeight;
y = Math.round(y);
return {
x: x >= this.size ? -1 : x,
y: y >= this.size ? -1 : y
};
}
I think getMousePos() in wgo.js is incorrect.
(wgo.js (line: 1151))
e.layerX, e.layerY get negative values or huge values, depended on browser expansion rate and element width.
It may be bug.
thanks
The text was updated successfully, but these errors were encountered: