MCPcopy Create free account
hub / github.com/hackmdio/codimd / scrollToBottom

Function scrollToBottom

public/js/index.js:1283–1297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1281}
1282
1283function scrollToBottom () {
1284 if (appState.currentMode === modeType.both) {
1285 var scrollInfo = editor.getScrollInfo()
1286 var scrollHeight = scrollInfo.height
1287 if (scrollInfo.top !== scrollHeight) { editor.scrollTo(0, scrollHeight * 2) } else {
1288 ui.area.view.animate({
1289 scrollTop: ui.area.view[0].scrollHeight
1290 }, 100, 'linear')
1291 }
1292 } else {
1293 $('body, html').stop(true, true).animate({
1294 scrollTop: $(document.body)[0].scrollHeight
1295 }, 100, 'linear')
1296 }
1297}
1298
1299window.scrollToTop = scrollToTop
1300window.scrollToBottom = scrollToBottom

Callers

nothing calls this directly

Calls 1

stopMethod · 0.45

Tested by

no test coverage detected