|
|
@@ -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'];
|
|
|
@@ -113,27 +114,6 @@ export class DankaDetail implements OnInit, AfterViewInit {
|
|
113
|
114
|
async init(): Promise<void> {
|
|
114
|
115
|
const id = this.route.snapshot.params['id'];
|
|
115
|
116
|
|
|
116
|
|
- console.log('id', id);
|
|
117
|
|
-
|
|
118
|
|
- this.danka = await this.dankaService.getDankaById(id);
|
|
119
|
|
-
|
|
120
|
|
- console.log('danka', this.danka);
|
|
121
|
|
-
|
|
122
|
|
- this.marriageRelations =
|
|
123
|
|
- await this.marriageRelationService.getMarriageRelationsByDankaId(id);
|
|
124
|
|
-
|
|
125
|
|
- console.log('marriageRelations', this.marriageRelations);
|
|
126
|
|
-
|
|
127
|
|
- this.families =
|
|
128
|
|
- await this.familyService.getFamiliesByDankaId(id);
|
|
129
|
|
-
|
|
130
|
|
- console.log('families', this.families);
|
|
131
|
|
-
|
|
132
|
|
- this.kakocholist =
|
|
133
|
|
- await this.kakochoService.getKakochoByDankaId(id);
|
|
134
|
|
-
|
|
135
|
|
- console.log('kakocholist', this.kakocholist);
|
|
136
|
|
-
|
|
137
|
117
|
if (!id) return;
|
|
138
|
118
|
|
|
139
|
119
|
this.danka = (await this.dankaService.getDankaById(id)) ?? undefined;
|
|
|
@@ -210,6 +190,12 @@ export class DankaDetail implements OnInit, AfterViewInit {
|
|
210
|
190
|
this.kakochoByNameMap.set(key, k);
|
|
211
|
191
|
});
|
|
212
|
192
|
|
|
|
193
|
+ // Angularへ反映
|
|
|
194
|
+ this.cdr.detectChanges();
|
|
|
195
|
+
|
|
|
196
|
+ // DOM描画完了待ち
|
|
|
197
|
+ await new Promise(resolve => setTimeout(resolve));
|
|
|
198
|
+
|
|
213
|
199
|
}
|
|
214
|
200
|
|
|
215
|
201
|
ngAfterViewInit(): void {
|