diff options
author | Mario <mario@mariovavti.com> | 2020-11-05 08:46:42 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-11-05 08:46:42 +0000 |
commit | bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch) | |
tree | 8929845be585b09d0f420621281c5531e1efad3e /library/cropperjs/src/js/events.js | |
parent | 6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff) | |
parent | fdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff) | |
download | volse-hubzilla-5.0.tar.gz volse-hubzilla-5.0.tar.bz2 volse-hubzilla-5.0.zip |
Merge branch '5.0RC'5.0
Diffstat (limited to 'library/cropperjs/src/js/events.js')
-rw-r--r-- | library/cropperjs/src/js/events.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/library/cropperjs/src/js/events.js b/library/cropperjs/src/js/events.js index 3753db022..e46888704 100644 --- a/library/cropperjs/src/js/events.js +++ b/library/cropperjs/src/js/events.js @@ -14,7 +14,6 @@ import { import { addListener, isFunction, - proxy, removeListener, } from './utilities'; @@ -42,29 +41,32 @@ export default { addListener(element, EVENT_ZOOM, options.zoom); } - addListener(cropper, EVENT_POINTER_DOWN, (this.onCropStart = proxy(this.cropStart, this))); + addListener(cropper, EVENT_POINTER_DOWN, (this.onCropStart = this.cropStart.bind(this))); if (options.zoomable && options.zoomOnWheel) { - addListener(cropper, EVENT_WHEEL, (this.onWheel = proxy(this.wheel, this))); + addListener(cropper, EVENT_WHEEL, (this.onWheel = this.wheel.bind(this)), { + passive: false, + capture: true, + }); } if (options.toggleDragModeOnDblclick) { - addListener(cropper, EVENT_DBLCLICK, (this.onDblclick = proxy(this.dblclick, this))); + addListener(cropper, EVENT_DBLCLICK, (this.onDblclick = this.dblclick.bind(this))); } addListener( element.ownerDocument, EVENT_POINTER_MOVE, - (this.onCropMove = proxy(this.cropMove, this)), + (this.onCropMove = this.cropMove.bind(this)), ); addListener( element.ownerDocument, EVENT_POINTER_UP, - (this.onCropEnd = proxy(this.cropEnd, this)), + (this.onCropEnd = this.cropEnd.bind(this)), ); if (options.responsive) { - addListener(window, EVENT_RESIZE, (this.onResize = proxy(this.resize, this))); + addListener(window, EVENT_RESIZE, (this.onResize = this.resize.bind(this))); } }, @@ -94,7 +96,10 @@ export default { removeListener(cropper, EVENT_POINTER_DOWN, this.onCropStart); if (options.zoomable && options.zoomOnWheel) { - removeListener(cropper, EVENT_WHEEL, this.onWheel); + removeListener(cropper, EVENT_WHEEL, this.onWheel, { + passive: false, + capture: true, + }); } if (options.toggleDragModeOnDblclick) { |