mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
581d9ec925
- removed lots of console.logs - working on the auto scrol, doesn't quite work yet
14 lines
421 B
CoffeeScript
14 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
|
|
}
|