Skip to content

Commit

Permalink
merge the pull-request: do not start drag if dnd-nodrag && no dnd-han…
Browse files Browse the repository at this point in the history
  • Loading branch information
benxshen committed Apr 2, 2018
1 parent 49c890b commit 23693a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions angular-drag-and-drop-lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
// Check whether the element is draggable, since dragstart might be triggered on a child.
if (element.attr('draggable') == 'false') return true;

// merge the pull-request: do not start drag if dnd-nodrag && no dnd-handle #432
// https://github.com/marceljuenemann/angular-drag-and-drop-lists/pull/432
if (element.attr('dnd-nodrag') !== undefined && !event._dndHandle) return false;

// Initialize global state.
dndState.isDragging = true;
dndState.itemType = attr.dndType && scope.$eval(attr.dndType).toLowerCase();
Expand Down

0 comments on commit 23693a1

Please sign in to comment.