Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gantt): support quick time focus #TINFR-1044 #494

Merged
merged 14 commits into from
Nov 27, 2024

Conversation

smile1016
Copy link
Contributor

No description provided.

@@ -127,7 +127,7 @@ export class NgxGanttRootComponent implements OnInit, OnDestroy {
}

private setupViewScroll() {
if (this.ganttUpper.disabledLoadOnScroll) {
if (this.ganttUpper.disabledLoadOnScroll || this.dom.isViewScrollSet) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (this.ganttUpper.disabledLoadOnScroll && !this.ganttUpper.quickTimeFocus)

) {}

ngOnInit(): void {
const onStable$ = this.ngZone.isStable ? from(Promise.resolve()) : this.ngZone.onStable.pipe(take(1));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些是不是可以去掉?是为了解决初始的时候,visibleRangeX没有值?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最新的提交没有去掉,是为了稳定后获取到 mainContainer。对 mainContainer 的位置变化进行监听

@Output() barClick = new EventEmitter<GanttBarClickEvent>();

@Output() lineClick = new EventEmitter<GanttLineClickEvent>();

@HostBinding('class.gantt-main-container') ganttMainClass = true;

constructor(@Inject(GANTT_UPPER_TOKEN) public ganttUpper: GanttUpper) {}
private unsubscribe$ = new Subject<void>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最好使用新的特性 takeUntilDestroyed

@luxiaobei luxiaobei merged commit df0f813 into worktile:master Nov 27, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants