Browse Source

dnd cleanup

Artur Paikin 7 years ago
parent
commit
b25b64c6a8
1 changed files with 3 additions and 22 deletions
  1. 3 22
      src/plugins/DragDrop/index.js

+ 3 - 22
src/plugins/DragDrop/index.js

@@ -43,12 +43,12 @@ module.exports = class DragDrop extends Plugin {
     // Merge default options with the ones set by user
     this.opts = Object.assign({}, defaultOpts, opts)
 
+        // Check for browser dragDrop support
+    this.isDragDropSupported = this.checkDragDropSupport()
+
     this.locale = Object.assign({}, defaultLocale, this.opts.locale)
     this.locale.strings = Object.assign({}, defaultLocale.strings, this.opts.locale.strings)
 
-    // Check for browser dragDrop support
-    this.isDragDropSupported = this.checkDragDropSupport()
-
     // i18n
     this.translator = new Translator({locale: this.locale})
     this.i18n = this.translator.translate.bind(this.translator)
@@ -116,25 +116,6 @@ module.exports = class DragDrop extends Plugin {
       input.click()
     }
 
-    // const next = (ev) => {
-    //   ev.preventDefault()
-    //   ev.stopPropagation()
-    //   this.core.emitter.emit('core:upload')
-    // }
-
-    // onload=${(ev) => {
-    //   const firstInput = this.target.querySelector('.UppyDragDrop-focus')
-    //   firstInput.focus()
-    // }}
-
-    // ${!this.core.opts.autoProceed
-    //   ? html`<button class="UppyDragDrop-uploadBtn UppyNextBtn"
-    //                  type="submit"
-    //                  onclick=${next}>
-    //           ${this.i18n('upload')}
-    //     </button>`
-    //   : ''}
-
     const selectedFilesCount = Object.keys(state.files).length
 
     return html`