Skip to content

Commit

Permalink
fix: fix misalignment when scrollbar scrolls to the edge
Browse files Browse the repository at this point in the history
  • Loading branch information
ark-65 committed Jul 4, 2023
1 parent f865ec3 commit 3761f01
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/gantt/src/gantt.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export class NgxGanttComponent extends GanttUpper implements OnInit, OnChanges,
}

ngAfterViewInit() {
this.updateScrollBarOffset();
if (this.virtualScrollEnabled) {
this.virtualScroll.renderedRangeStream.pipe(takeUntil(this.unsubscribe$)).subscribe((range) => {
const linksElement = this.elementRef.nativeElement.querySelector('.gantt-links-overlay') as HTMLDivElement;
Expand All @@ -198,9 +199,6 @@ export class NgxGanttComponent extends GanttUpper implements OnInit, OnChanges,
this.computeTempDataRefs();
});
}
setTimeout(() => {
this.updateScrollBarOffset();
});
}

private buildFlatItems() {
Expand Down

0 comments on commit 3761f01

Please sign in to comment.