mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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
|
||
|
}
|