overleaf/services/web/public/coffee/app/ide/file-tree/directives/droppable.coffee

15 lines
287 B
CoffeeScript
Raw Normal View History

2014-06-23 05:57:31 -04:00
define [
"base"
], (App) ->
App.directive "droppable", () ->
return {
scope: {
onDropCallback: "="
}
link: (scope, element, attrs) ->
element.droppable
greedy: true
hoverClass: "droppable-hover"
2014-06-27 10:55:08 -04:00
accept: attrs.accept
2014-06-23 05:57:31 -04:00
drop: scope.onDropCallback
}