mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-17 04:40:58 +00:00
Do not add/remove touch listeners in non-supporting environments.
This commit is contained in:
parent
efd2aba325
commit
5fa051ccb9
3 changed files with 13 additions and 13 deletions
12
dist/all.js
vendored
12
dist/all.js
vendored
|
|
@ -4669,26 +4669,26 @@ fabric.util.string = {
|
|||
_this.__onMouseDown(e);
|
||||
|
||||
addListener(fabric.document, 'mouseup', _this._onMouseUp);
|
||||
addListener(fabric.document, 'touchend', _this._onMouseUp);
|
||||
fabric.isTouchSupported && addListener(fabric.document, 'touchend', _this._onMouseUp);
|
||||
|
||||
addListener(fabric.document, 'mousemove', _this._onMouseMove);
|
||||
addListener(fabric.document, 'touchmove', _this._onMouseMove);
|
||||
fabric.isTouchSupported && addListener(fabric.document, 'touchmove', _this._onMouseMove);
|
||||
|
||||
removeListener(_this.upperCanvasEl, 'mousemove', _this._onMouseMove);
|
||||
removeListener(_this.upperCanvasEl, 'touchmove', _this._onMouseMove);
|
||||
fabric.isTouchSupported && removeListener(_this.upperCanvasEl, 'touchmove', _this._onMouseMove);
|
||||
};
|
||||
|
||||
this._onMouseUp = function (e) {
|
||||
_this.__onMouseUp(e);
|
||||
|
||||
removeListener(fabric.document, 'mouseup', _this._onMouseUp);
|
||||
removeListener(fabric.document, 'touchend', _this._onMouseUp);
|
||||
fabric.isTouchSupported && removeListener(fabric.document, 'touchend', _this._onMouseUp);
|
||||
|
||||
removeListener(fabric.document, 'mousemove', _this._onMouseMove);
|
||||
removeListener(fabric.document, 'touchmove', _this._onMouseMove);
|
||||
fabric.isTouchSupported && removeListener(fabric.document, 'touchmove', _this._onMouseMove);
|
||||
|
||||
addListener(_this.upperCanvasEl, 'mousemove', _this._onMouseMove);
|
||||
addListener(_this.upperCanvasEl, 'touchmove', _this._onMouseMove);
|
||||
fabric.isTouchSupported && addListener(_this.upperCanvasEl, 'touchmove', _this._onMouseMove);
|
||||
};
|
||||
|
||||
this._onMouseMove = function (e) {
|
||||
|
|
|
|||
2
site
2
site
|
|
@ -1 +1 @@
|
|||
Subproject commit fb3ecc3c570c2927d3e8c32ed463521af9c123d5
|
||||
Subproject commit 510c76dd0e0ee0549756997928145a079389c14b
|
||||
|
|
@ -399,26 +399,26 @@
|
|||
_this.__onMouseDown(e);
|
||||
|
||||
addListener(fabric.document, 'mouseup', _this._onMouseUp);
|
||||
addListener(fabric.document, 'touchend', _this._onMouseUp);
|
||||
fabric.isTouchSupported && addListener(fabric.document, 'touchend', _this._onMouseUp);
|
||||
|
||||
addListener(fabric.document, 'mousemove', _this._onMouseMove);
|
||||
addListener(fabric.document, 'touchmove', _this._onMouseMove);
|
||||
fabric.isTouchSupported && addListener(fabric.document, 'touchmove', _this._onMouseMove);
|
||||
|
||||
removeListener(_this.upperCanvasEl, 'mousemove', _this._onMouseMove);
|
||||
removeListener(_this.upperCanvasEl, 'touchmove', _this._onMouseMove);
|
||||
fabric.isTouchSupported && removeListener(_this.upperCanvasEl, 'touchmove', _this._onMouseMove);
|
||||
};
|
||||
|
||||
this._onMouseUp = function (e) {
|
||||
_this.__onMouseUp(e);
|
||||
|
||||
removeListener(fabric.document, 'mouseup', _this._onMouseUp);
|
||||
removeListener(fabric.document, 'touchend', _this._onMouseUp);
|
||||
fabric.isTouchSupported && removeListener(fabric.document, 'touchend', _this._onMouseUp);
|
||||
|
||||
removeListener(fabric.document, 'mousemove', _this._onMouseMove);
|
||||
removeListener(fabric.document, 'touchmove', _this._onMouseMove);
|
||||
fabric.isTouchSupported && removeListener(fabric.document, 'touchmove', _this._onMouseMove);
|
||||
|
||||
addListener(_this.upperCanvasEl, 'mousemove', _this._onMouseMove);
|
||||
addListener(_this.upperCanvasEl, 'touchmove', _this._onMouseMove);
|
||||
fabric.isTouchSupported && addListener(_this.upperCanvasEl, 'touchmove', _this._onMouseMove);
|
||||
};
|
||||
|
||||
this._onMouseMove = function (e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue