added options back for removal (#4958)

This commit is contained in:
Andrea Bogazzi 2018-06-02 00:00:41 +02:00 committed by GitHub
parent bd0d0125be
commit 86111836e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,14 +110,14 @@
removeListener(fabric.window, 'resize', this._onResize);
removeListener(this.upperCanvasEl, 'mousedown', this._onMouseDown);
removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove, addEventOptions);
removeListener(this.upperCanvasEl, 'mouseout', this._onMouseOut);
removeListener(this.upperCanvasEl, 'mouseenter', this._onMouseEnter);
removeListener(this.upperCanvasEl, 'wheel', this._onMouseWheel);
removeListener(this.upperCanvasEl, 'contextmenu', this._onContextMenu);
removeListener(this.upperCanvasEl, 'doubleclick', this._onDoubleClick);
removeListener(this.upperCanvasEl, 'touchstart', this._onMouseDown);
removeListener(this.upperCanvasEl, 'touchmove', this._onMouseMove);
removeListener(this.upperCanvasEl, 'touchstart', this._onMouseDown, addEventOptions);
removeListener(this.upperCanvasEl, 'touchmove', this._onMouseMove, addEventOptions);
removeListener(this.upperCanvasEl, 'dragover', this._onDragOver);
removeListener(this.upperCanvasEl, 'dragenter', this._onDragEnter);
removeListener(this.upperCanvasEl, 'dragleave', this._onDragLeave);
@ -257,8 +257,8 @@
addListener(fabric.document, 'touchend', this._onMouseUp, addEventOptions);
addListener(fabric.document, 'touchmove', this._onMouseMove, addEventOptions);
removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
removeListener(this.upperCanvasEl, 'touchmove', this._onMouseMove);
removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove, addEventOptions);
removeListener(this.upperCanvasEl, 'touchmove', this._onMouseMove, addEventOptions);
if (e.type === 'touchstart') {
// Unbind mousedown to prevent double triggers from touch devices
@ -266,7 +266,7 @@
}
else {
addListener(fabric.document, 'mouseup', this._onMouseUp);
addListener(fabric.document, 'mousemove', this._onMouseMove);
addListener(fabric.document, 'mousemove', this._onMouseMove, addEventOptions);
}
},
@ -280,8 +280,8 @@
removeListener(fabric.document, 'mouseup', this._onMouseUp);
removeListener(fabric.document, 'touchend', this._onMouseUp, addEventOptions);
removeListener(fabric.document, 'mousemove', this._onMouseMove);
removeListener(fabric.document, 'touchmove', this._onMouseMove);
removeListener(fabric.document, 'mousemove', this._onMouseMove, addEventOptions);
removeListener(fabric.document, 'touchmove', this._onMouseMove, addEventOptions);
addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove, addEventOptions);
addListener(this.upperCanvasEl, 'touchmove', this._onMouseMove, addEventOptions);