diff --git a/src/app/views/map/map.component.ts b/src/app/views/map/map.component.ts index 14985e2..75b1c5d 100644 --- a/src/app/views/map/map.component.ts +++ b/src/app/views/map/map.component.ts @@ -162,9 +162,9 @@ export class MapComponent implements OnDestroy, OnInit { } } - startCalibrating = () => { + startCalibrating = (menuItem?) => { let calibration = this.bottomSheet.open(CalibrateComponent, {hasBackdrop: false, disableClose: true}); - this.sub = calibration.afterDismissed().pipe(finalize(() => calibration.dismiss())).subscribe(); + this.sub = calibration.afterDismissed().pipe(finalize(() => calibration.dismiss()), filter(menuItem => !!menuItem)).subscribe(() => menuItem.enabled = false); }; startCircle = menuItem => {