ucap-doc/documents/업무/5월/3째주/lgweb-group-backup/temp.txt
Park Byung Eun 886d545ccb 0522 sync
2020-05-22 18:48:03 +09:00

42 lines
1.0 KiB
Plaintext

private async inlineDialog(curValue: string, left: number, top: number): Promise<string> {
const target = this.elementRef.nativeElement.querySelector(
'.mat-tree-node'
);
const rect = target.getBoundingClientRect();
const clickEventY = this.groupMenuEvent.clientY;
const tartgetY = Math.floor((clickEventY - 150) * 0.1) * 10;
const dialogRef = this.dialog.open(EditInlineInputDialogComponent, {
width: rect.width,
height: rect.height,
panelClass: 'ucap-edit-group-name-dialog',
data: {
curValue,
left,
top
}
});
dialogRef
.afterClosed()
.pipe(
take(1),
map((result) => {
if (
!!result &&
result.choice &&
result.curValue.localeCompare(curValue) !== 0
) {
return result.curValue;
}
return '';
}),
catchError((err) => {
return of(err);
})
)
.subscribe();
}