Browse Source

Merge pull request #230373 in DEC/fineui from release/11.0 to bugfix/11.0

* commit 'c849674bbecf6045e84bd1824ef2d201416755fe':
  KERNEL-14365 refactor(tracker): 多暴露个event对象
research/test
superman 2 years ago
parent
commit
02f857237d
  1. 12
      src/core/utils/events/mousemovetracker.js

12
src/core/utils/events/mousemovetracker.js

@ -82,7 +82,7 @@
// The mouse may move faster then the animation frame does.
// Use `requestAnimationFrame` to avoid over-updating.
this._animationFrameID =
requestAnimationFrame(this._didMouseMove);
requestAnimationFrame(() => this._didMouseMove(event));
}
this._x = x;
@ -90,18 +90,18 @@
event.preventDefault ? event.preventDefault() : (event.returnValue = false);
},
_didMouseMove: function () {
_didMouseMove: function (event) {
this._animationFrameID = null;
this._onMove(this._deltaX, this._deltaY);
this._onMove(this._deltaX, this._deltaY, event);
this._deltaX = 0;
this._deltaY = 0;
},
_onMouseUp: function () {
_onMouseUp: function (event) {
if (this._animationFrameID) {
this._didMouseMove();
this._didMouseMove(event);
}
this._onMoveEnd();
this._onMoveEnd(event);
}
};
})();

Loading…
Cancel
Save