Skip to content

Commit

Permalink
Merge pull request #541 from correctexam/536-bug-when-zooming-in-the-…
Browse files Browse the repository at this point in the history
…annotation-view

update asynchrone error when loading question
  • Loading branch information
barais authored Apr 18, 2024
2 parents 630b68e + fffcd7a commit 41832c2
Showing 1 changed file with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,23 @@ export class FabricCanvasComponent implements OnInit, OnDestroy {
});
}
this.questionService.query({ examId: this.exam.id! }).subscribe(qs => {
qs.body?.forEach(q => {
if (q.id !== undefined) {
this.eventHandler.questions.set(q.id, q);
}
this.zoneService.find(q.zoneId!).subscribe(z => {
const ezone = z.body as CustomZone;
ezone.type = DrawingTools.QUESTIONBOX;
this.renderZone(ezone);
if (qs.body?.length !== undefined && qs.body?.length > 0) {
qs.body?.forEach(q => {
if (q.id !== undefined) {
this.eventHandler.questions.set(q.id, q);
}

this.zoneService.find(q.zoneId!).subscribe(z => {
const ezone = z.body as CustomZone;
ezone.type = DrawingTools.QUESTIONBOX;
this.renderZone(ezone);
});
});
});
this.processpdf = true;
} else {
this.processpdf = true;
}
});
this.processpdf = true;
});
}

Expand Down

0 comments on commit 41832c2

Please sign in to comment.