import Ember from 'ember';

export default Ember.Component.extend({
    classNames: ['draggable-dropzone'],
    classNameBindings: ['dragClass'],
    dragClass: 'deactivated',

    dragLeave: function(event) {
        event.preventDefault();
        this.set('dragClass', 'deactivated');
    },

    dragOver: function(event) {
        event.preventDefault();
        this.set('dragClass', 'activated');
    },

    drop: function(event) {
        event.preventDefault();
        this.set('dragClass', 'deactivated');
        data = event.dataTransfer.getData('text/data');
        // default drop action - change with {{draggable-dropzone dropped=xyz}}
        this.sendAction('dropped', data);
    }
});

import Ember from 'ember';

export default Ember.Component.extend({
    classNames: ['draggable-dropzone'],
    classNameBindings: ['dragClass'],
    dragClass: 'deactivated',

    dragLeave: function(event) {
        event.preventDefault();
        this.set('dragClass', 'deactivated');
    },

    dragOver: function(event) {
        event.preventDefault();
        this.set('dragClass', 'activated');
    },

    drop: function(event) {
        event.preventDefault();
        this.set('dragClass', 'deactivated');
        var data = event.dataTransfer.getData('text/data');
        // default drop action - change with {{draggable-dropzone dropped=xyz}}
        this.sendAction('dropped', data);
    }
});

Fix small issue with ember dropzone
Fix small issue with ember dropzone
