overleaf/services/web/public/coffee/directives/maxHeight.coffee

11 lines
229 B
CoffeeScript
Raw Normal View History

define [
"base"
], (App) ->
App.directive "maxHeight", () ->
return {
restrict: "A"
link: (scope, element, attrs) ->
scope.$watch attrs.maxHeight, (value) ->
if value?
element.css("max-height": value)
}