Skip to content
Snippets Groups Projects
Commit 870d4215 authored by edwardmuel's avatar edwardmuel Committed by GitHub
Browse files

Add threshold to check if admin log viewer is at bottom

parent 2511b1c2
No related branches found
No related tags found
No related merge requests found
......@@ -32,8 +32,9 @@ Template.viewLogs.onRendered ->
template = this
template.isAtBottom = ->
if wrapper.scrollTop >= wrapper.scrollHeight - wrapper.clientHeight
template.isAtBottom = (scrollThreshold) ->
if not scrollThreshold? then scrollThreshold = 0
if wrapper.scrollTop + scrollThreshold >= wrapper.scrollHeight - wrapper.clientHeight
newLogs.className = "new-logs not"
return true
return false
......@@ -43,7 +44,7 @@ Template.viewLogs.onRendered ->
newLogs.className = "new-logs not"
template.checkIfScrollIsAtBottom = ->
template.atBottom = template.isAtBottom()
template.atBottom = template.isAtBottom(100)
readMessage.enable()
readMessage.read()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment