зеркало из https://github.com/mozilla/pjs.git
Back out 5d997f85c1b9 (Bug 639179 Part 1) due to mobile unittest orange. CLOSED TREE
This commit is contained in:
Родитель
9384f80013
Коммит
18017259fa
|
@ -328,8 +328,11 @@ MouseModule.prototype = {
|
|||
if (dragData.isPan()) {
|
||||
// Only pan when mouse event isn't part of a click. Prevent jittering on tap.
|
||||
this._kinetic.addData(sX - dragData.prevPanX, sY - dragData.prevPanY);
|
||||
this._dragBy(this.dX, this.dY);
|
||||
// dragBy will reset dX and dY values to 0.
|
||||
if (!this._waitingForPaint) {
|
||||
this._dragBy(this.dX, this.dY);
|
||||
this.dX = 0;
|
||||
this.dY = 0;
|
||||
}
|
||||
|
||||
// Let everyone know when mousemove begins a pan
|
||||
if (!oldIsPan && dragData.isPan()) {
|
||||
|
@ -391,16 +394,11 @@ MouseModule.prototype = {
|
|||
* the dragger of dragMove()s.
|
||||
*/
|
||||
_dragBy: function _dragBy(dX, dY, aIsKinetic) {
|
||||
let dragged = true;
|
||||
if (!this._waitingForPaint || aIsKinetic) {
|
||||
let dragData = this._dragData;
|
||||
dragged = this._dragger.dragMove(dX, dY, this._targetScrollInterface, aIsKinetic);
|
||||
if (dragged && !this._waitingForPaint) {
|
||||
this._waitingForPaint = true;
|
||||
mozRequestAnimationFrame(this);
|
||||
}
|
||||
this.dX = 0;
|
||||
this.dY = 0;
|
||||
let dragData = this._dragData;
|
||||
let dragged = this._dragger.dragMove(dX, dY, this._targetScrollInterface, aIsKinetic);
|
||||
if (dragged && !this._waitingForPaint) {
|
||||
this._waitingForPaint = true;
|
||||
mozRequestAnimationFrame(this);
|
||||
}
|
||||
return dragged;
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче