mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
15 lines
421 B
CoffeeScript
15 lines
421 B
CoffeeScript
|
define [
|
||
|
"base"
|
||
|
], (App) ->
|
||
|
App.directive 'scrollToBottomOn', () ->
|
||
|
return {
|
||
|
link: (scope, element, attrs) ->
|
||
|
element = element[0]
|
||
|
eventToScrollOn = attrs.scrollToBottomOn
|
||
|
console.log eventToScrollOn
|
||
|
scope.$on eventToScrollOn, ()->
|
||
|
console.log element.scrollHeight, element.scrollTop
|
||
|
element.scrollTop = element.scrollHeight*4
|
||
|
console.log element.scrollHeight, element.scrollTop
|
||
|
}
|