mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
483019. no need for Math.abs when multiplying two numbers together. r=gavin
This commit is contained in:
parent
19b728c0f5
commit
9d5c57b54a
@ -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…
x
Reference in New Issue
Block a user