|
|
@@ -1,4 +1,4 @@
|
|
1
|
|
-import { Component } from '@angular/core';
|
|
|
1
|
+import { ChangeDetectorRef, Component } from '@angular/core';
|
|
2
|
2
|
import {
|
|
3
|
3
|
ElementRef,
|
|
4
|
4
|
ViewChild,
|
|
|
@@ -93,6 +93,7 @@ export class DankaDetail implements OnInit, AfterViewInit {
|
|
93
|
93
|
private familyTreeLayout: FamilyTreeLayoutService,
|
|
94
|
94
|
private familyUnitLayout: FamilyUnitLayoutService,
|
|
95
|
95
|
private eventService: EventService,
|
|
|
96
|
+ private cdr: ChangeDetectorRef,
|
|
96
|
97
|
) {
|
|
97
|
98
|
|
|
98
|
99
|
const tab = this.route.snapshot.queryParams['tab'];
|
|
|
@@ -112,6 +113,7 @@ export class DankaDetail implements OnInit, AfterViewInit {
|
|
112
|
113
|
}
|
|
113
|
114
|
async init(): Promise<void> {
|
|
114
|
115
|
const id = this.route.snapshot.params['id'];
|
|
|
116
|
+
|
|
115
|
117
|
if (!id) return;
|
|
116
|
118
|
|
|
117
|
119
|
this.danka = (await this.dankaService.getDankaById(id)) ?? undefined;
|
|
|
@@ -188,6 +190,12 @@ export class DankaDetail implements OnInit, AfterViewInit {
|
|
188
|
190
|
this.kakochoByNameMap.set(key, k);
|
|
189
|
191
|
});
|
|
190
|
192
|
|
|
|
193
|
+ // Angularへ反映
|
|
|
194
|
+ this.cdr.detectChanges();
|
|
|
195
|
+
|
|
|
196
|
+ // DOM描画完了待ち
|
|
|
197
|
+ await new Promise(resolve => setTimeout(resolve));
|
|
|
198
|
+
|
|
191
|
199
|
}
|
|
192
|
200
|
|
|
193
|
201
|
ngAfterViewInit(): void {
|