mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
15 lines
No EOL
364 B
CoffeeScript
15 lines
No EOL
364 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.directive "droppable", () ->
|
|
return {
|
|
link: (scope, element, attrs) ->
|
|
scope.$watch attrs.droppable, (droppable) ->
|
|
if droppable
|
|
element.droppable
|
|
greedy: true
|
|
hoverClass: "droppable-hover"
|
|
tolerance: "pointer"
|
|
accept: attrs.accept
|
|
drop: scope.$eval(attrs.onDropCallback)
|
|
} |