Make shouldAllowDrag method work properly

This commit is contained in:
Nathan Sobo
2013-02-26 19:05:10 -07:00
committed by probablycorey
parent 47621bd3b2
commit 28141e315e

View File

@@ -14,7 +14,9 @@ class SortableList extends View
@on 'drop', '.sortable', @onDrop
onDragStart: (event) =>
return false if !@shouldAllowDrag(event)
unless @shouldAllowDrag(event)
event.preventDefault()
return
el = @getSortableElement(event)
el.addClass 'is-dragging'