overleaf/services/web/public/coffee/app/ide/file-tree/directives/droppable.coffee
2014-06-27 15:55:08 +01:00

15 lines
No EOL
287 B
CoffeeScript

define [
"base"
], (App) ->
App.directive "droppable", () ->
return {
scope: {
onDropCallback: "="
}
link: (scope, element, attrs) ->
element.droppable
greedy: true
hoverClass: "droppable-hover"
accept: attrs.accept
drop: scope.onDropCallback
}