npm install ngx-auto-scroll
import {NgxAutoScrollModule} from "ngx-auto-scroll";
@NgModule({
...
imports: [ ..., NgxAutoScrollModule]
...
})
{{ message }}
Argument passed to lock-y-offset is bottom offset of scroll position in pixels after scroll container stops auto scroll. Default value is 10.
observe-attributes (optional, default - false) enable listening on attributes changes for example detect changes in font size.
When your DOM element or its parent is hidden auto scroll won't work. There is no simple/pure way to scroll hidden element. The best way is to force scrolling down after the element is shown.
import {NgxAutoScroll} from "ngx-auto-scroll";
@Component({
selector: 'sample',
})
export class SampleComponent {
@ViewChild(NgxAutoScroll) ngxAutoScroll: NgxAutoScroll;
public forceScrollDown(): void {
this.ngxAutoScroll.forceScrollDown();
}
}
This component is built as an Angular 5 module using ng-packagr.
npm run ng-build
To build and publish this component as an Angular 5 module use
npm run ng-publish
$ claude mcp add ngx-auto-scroll \
-- python -m otcore.mcp_server <graph>