This commit is contained in:
MrPlatnum committed 2025-09-14 19:25:25 +02:00
1 parent e1d21d0a19
commit 1df7612b8d
5 files changed
+31 -22

No files matched your search

@@ -125,6 +125,6 @@ export class DemographicsFeedbackComponent implements OnInit, OnDestroy {
}
ngOnDestroy() {
this.metricsService.fullCleanup();
this.metricsService.resetMetrics();
}
}
@@ -23,7 +23,7 @@ import '../../../../../assets/scripts/model-viewer';
styleUrls: ['./spatial-position-assessment.component.css'],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class SpatialPositionAssessmentComponent implements AfterViewInit {
export class SpatialPositionAssessmentComponent implements AfterViewInit, OnDestroy {
@ViewChild('modelViewer') modelViewerRef!: ElementRef<any>;
@Output() testComplete = new EventEmitter<void>();
@@ -39,6 +39,9 @@ export class SpatialPositionAssessmentComponent implements AfterViewInit {
constructor(private cdr: ChangeDetectorRef) {
this.logInteraction = this.logInteraction.bind(this);
}
ngOnDestroy() {
this.metricsService.stopTracking();
}
ngAfterViewInit() {
const mv = this.modelViewerRef.nativeElement;
@@ -166,5 +166,6 @@ export class SpatialStabilityAssessmentComponent implements AfterViewInit, OnDes
if (this.countdownInterval) {
clearInterval(this.countdownInterval);
}
this.metricsService.stopTracking();
}
}
@@ -23,7 +23,7 @@ import '../../../../../assets/scripts/model-viewer';
styleUrls: ['./text-legibility-assessment.component.css'],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class TextLegibilityAssessmentComponent implements AfterViewInit {
export class TextLegibilityAssessmentComponent implements AfterViewInit, OnDestroy {
@ViewChild('modelViewer') modelViewerRef!: ElementRef<any>;
@Output() testComplete = new EventEmitter<void>();
@Output() redoTest = new EventEmitter<number>();
@@ -127,4 +127,10 @@ export class TextLegibilityAssessmentComponent implements AfterViewInit {
this.testComplete.emit();
}
ngOnDestroy() {
this.metricsService.stopTracking();
}
}