From 6e551ab9181f6e41919cf5769c24b881b5bcc66e Mon Sep 17 00:00:00 2001 From: Taye Adeyemi Date: Fri, 23 Mar 2018 00:23:50 +0100 Subject: [PATCH] actions/drop/DopEvent: add jsdoc comments --- src/actions/drop/DropEvent.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/actions/drop/DropEvent.js b/src/actions/drop/DropEvent.js index 36f42d440..186606ea5 100644 --- a/src/actions/drop/DropEvent.js +++ b/src/actions/drop/DropEvent.js @@ -1,6 +1,9 @@ import * as arr from '../../utils/arr'; -export default class DropEvent { +class DropEvent { + /** + * Class of events fired on dropzones during drags with acceptable targets. + */ constructor (dropStatus, dragEvent, type) { const { element, dropzone } = type === 'dragleave' ? dropStatus.prev @@ -19,6 +22,13 @@ export default class DropEvent { this.propagationStopped = this.immediatePropagationStopped = false; } + /** + * If this is a `dropactivate` event, the dropzone element will be + * deactivated. + * + * If this is a `dragmove` or `dragenter`, a `dragleave` will be fired on the + * dropzone element and more. + */ reject () { const { dropStatus } = this.interaction; @@ -70,3 +80,5 @@ export default class DropEvent { this.immediatePropagationStopped = this.propagationStopped = true; } } + +export default DropEvent;