Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

fix(droppable): allow the drop active class to be customised

  • Loading branch information...
Matt Lewis
Matt Lewis committed Mar 22, 2016
1 parent ad9beb7 commit fc85410760a9d5c1ab49c243ac5191202b497bbe
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/directives/mwlDroppable.js
@@ -10,15 +10,17 @@ angular
return;
}

var DROP_ACTIVE_CLASS = $attrs.dropActiveClass || 'drop-active';

interact($element[0]).dropzone({
ondragenter: function(event) {
angular.element(event.target).addClass('drop-active');
angular.element(event.target).addClass(DROP_ACTIVE_CLASS);
},
ondragleave: function(event) {
angular.element(event.target).removeClass('drop-active');
angular.element(event.target).removeClass(DROP_ACTIVE_CLASS);
},
ondropdeactivate: function(event) {
angular.element(event.target).removeClass('drop-active');
angular.element(event.target).removeClass(DROP_ACTIVE_CLASS);
},
ondrop: function(event) {
if (event.relatedTarget.dropData) {

0 comments on commit fc85410

Please sign in to comment.
You can’t perform that action at this time.