-
Notifications
You must be signed in to change notification settings - Fork 77
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
Conversation
packages/gantt/src/root.component.ts
Outdated
@@ -127,7 +127,7 @@ export class NgxGanttRootComponent implements OnInit, OnDestroy { | |||
} | |||
|
|||
private setupViewScroll() { | |||
if (this.ganttUpper.disabledLoadOnScroll) { | |||
if (this.ganttUpper.disabledLoadOnScroll || this.dom.isViewScrollSet) { |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些是不是可以去掉?是为了解决初始的时候,visibleRangeX没有值?
There was a problem hiding this comment.
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>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最好使用新的特性 takeUntilDestroyed
No description provided.