mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
10 lines
287 B
CoffeeScript
10 lines
287 B
CoffeeScript
Darkswarm.directive "bodyScroll", ($rootScope, BodyScroll) ->
|
|
restrict: 'A'
|
|
scope: true
|
|
link: (scope, elem, attrs) ->
|
|
$rootScope.$on "toggleBodyScroll", ->
|
|
if BodyScroll.disabled
|
|
elem.addClass "disable-scroll"
|
|
else
|
|
elem.removeClass "disable-scroll"
|