Last active
August 29, 2015 14:14
-
-
Save nummi/35f45078ee04fee21a94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| var cancelDragEvent = function(e) { | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| return false; | |
| }; | |
| export default { | |
| dragItem: null, | |
| cancel: function(e) { return cancelDragEvent(e); }, | |
| DraggableMixin: Ember.Mixin.create({ | |
| attributeBindings: ['draggable'], | |
| draggable: true, | |
| dragStart: function() { throw 'Implement dragStart'; } | |
| }), | |
| DroppableMixin: Ember.Mixin.create({ | |
| _dragEnter: function(e) { | |
| return cancelDragEvent(e); | |
| }.on('dragEnter'), | |
| _dragOver: function(e) { | |
| return cancelDragEvent(e); | |
| }.on('dragOver'), | |
| drop: function() { throw 'Implement drop'; } | |
| }) | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment