조직도 메뉴 선택시 현재 선택된 부서로 트리 스크롤링 하도록 수정.

This commit is contained in:
leejinho 2020-03-30 16:48:17 +09:00
parent 7bb6345e9c
commit 78e661732c

View File

@ -226,6 +226,16 @@ export class TreeComponent implements OnInit, OnDestroy, AfterViewInit {
setTimeout(() => {
if (!!this.cvsvOrganization) {
this.cvsvOrganization.checkViewportSize();
// scroll index
if (!!this.cvsvOrganization) {
const curIndex = this.dataSource.expandedDataSubject.value.findIndex(
node => node.deptInfo.seq === this.currentDeptSeq
);
if (curIndex > -1) {
this.cvsvOrganization.scrollToIndex(curIndex);
}
}
this.psDirectiveRef.update();
}
}, 100);