angular-tree-control
angular-tree-control copied to clipboard
Determining when user has scrolled to bottom of editor
Hi All
I have an Ace editor instance that I want to progressively load the contents of by making repeating calls to my back-end - in order to provide an 'infinite scroll' like user experience. In order to implement this I need to be able to determine when a user has scrolled to the bottom of the editor - aka when the vertical scrollbar is all the way at the bottom of the vertical scroll 'region'.
How can this be accomplished ?
Thanks Dave
I figured out a solution.
Since I'm incrementally loading the data I know how many lines of data I'm loading in each 'chunk'. I then use the 'getLastVisibleRow()' method to determine if the user has scrolled to the last row in the last 'chunk' of data loaded. Works great ...
var indexOfLastRow = editor.getLastVisibleRow()
Dave