From d888bb8a5416f55eb3aeb863f4e2d81b9542b5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Wed, 16 Sep 2015 15:52:54 +0200 Subject: [PATCH] PR Feedback: remove unnecessary DnD functions --- .../file_drag_and_drop.js | 42 +------------------ 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop.js b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop.js index 1e21aeb8..4c9211c5 100644 --- a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop.js +++ b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop.js @@ -12,14 +12,8 @@ import { getLangText } from '../../../utils/lang_utils'; // Taken from: https://github.com/fedosejev/react-file-drag-and-drop let FileDragAndDrop = React.createClass({ propTypes: { - onDragStart: React.PropTypes.func, onDrop: React.PropTypes.func.isRequired, - onDrag: React.PropTypes.func, - onDragEnter: React.PropTypes.func, - onLeave: React.PropTypes.func, - onDragLeave: React.PropTypes.func, onDragOver: React.PropTypes.func, - onDragEnd: React.PropTypes.func, onInactive: React.PropTypes.func, filesToUpload: React.PropTypes.array, handleDeleteFile: React.PropTypes.func, @@ -49,36 +43,6 @@ let FileDragAndDrop = React.createClass({ allowedExtensions: React.PropTypes.string }, - handleDragStart(event) { - if (typeof this.props.onDragStart === 'function') { - this.props.onDragStart(event); - } - }, - - handleDrag(event) { - if (typeof this.props.onDrag === 'function') { - this.props.onDrag(event); - } - }, - - handleDragEnd(event) { - if (typeof this.props.onDragEnd === 'function') { - this.props.onDragEnd(event); - } - }, - - handleDragEnter(event) { - if (typeof this.props.onDragEnter === 'function') { - this.props.onDragEnter(event); - } - }, - - handleDragLeave(event) { - if (typeof this.props.onDragLeave === 'function') { - this.props.onDragLeave(event); - } - }, - handleDragOver(event) { event.preventDefault(); @@ -207,13 +171,9 @@ let FileDragAndDrop = React.createClass({ return (
+ onDrop={this.handleDrop}>