mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
483019. no need for Math.abs when multiplying two numbers together. r=gavin
This commit is contained in:
parent
25f28968db
commit
98f95a2220
@ -335,7 +335,7 @@ ChromeInputModule.prototype = {
|
||||
let dy = dragData.sY - aEvent.screenY;
|
||||
|
||||
if (!dragData.dragging && dragData.dragStartTimeout != -1) {
|
||||
if ((Math.abs(dx*dx) + Math.abs(dy*dy)) > 100) {
|
||||
if (dx*dx + dy*dy > 100) {
|
||||
clearTimeout(dragData.dragStartTimeout);
|
||||
this._dragStart(aEvent.screenX, aEvent.screenY);
|
||||
}
|
||||
@ -546,7 +546,7 @@ ContentPanningModule.prototype = {
|
||||
let dy = dragData.sY - aEvent.screenY;
|
||||
|
||||
if (!dragData.dragging && dragData.dragStartTimeout != -1) {
|
||||
if ((Math.abs(dx*dx) + Math.abs(dy*dy)) > 100) {
|
||||
if (dx*dx + dy*dy > 100) {
|
||||
clearTimeout(dragData.dragStartTimeout);
|
||||
this._dragStart(aEvent.screenX, aEvent.screenY);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user