Closed Smarthard closed 1 month ago
I think it would be great if ngx-scrollbar could provide out-of-the-box solution for alignment of element user want to scroll into.
ngxScrollbar.scrollToElement('#target', { align: 'middle' }) // also maybe: right, left, top, bottom // probably combination of the above
In this case scrollbar will scroll to the middle of available scrollable container near the target element.
@Smarthard in v16, you can use all the options that scrollTo function has. and added a boolean option center to scroll to the center of a target element.
scrollTo
center
Feature Description
I think it would be great if ngx-scrollbar could provide out-of-the-box solution for alignment of element user want to scroll into.
Use Case
In this case scrollbar will scroll to the middle of available scrollable container near the target element.