|
|
|
|
@ -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() |
|
|
|
|
|
|
|
|
|
|