Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(status: SubjectStatus) => {
if (status === SubjectStatus.Done) {
if (options.showLegend === true) {
this.addLegend(doc, map, margins);
} else {
this.saveDoc(doc);
}
}
if (status === SubjectStatus.Done || status === SubjectStatus.Error) {
this.activityService.unregister(this.activityId);
status$.next(SubjectStatus.Done);
}
}
);
(status: SubjectStatus) => {
if (status === SubjectStatus.Done) {
if (options.showLegend === true) {
this.addLegend(doc, map, margins, resolution);
} else {
this.saveDoc(doc);
}
}
if (status === SubjectStatus.Done || status === SubjectStatus.Error) {
this.activityService.unregister(this.activityId);
status$.next(SubjectStatus.Done);
}
}
);
timeout = window.setTimeout(() => {
mapStatus$$.unsubscribe();
let status = SubjectStatus.Done;
try {
this.addCanvas(doc, canvas, size, margins);
} catch (err) {
status = SubjectStatus.Error;
this.messageService.error(
this.languageService.translate.instant('igo.geo.printForm.corsErrorMessageBody'),
this.languageService.translate.instant('igo.geo.printForm.corsErrorMessageHeader'),
'print'
);
}
this.renderMap(map, mapSize, extent);
status$.next(status);
}, 200);
});
timeout = window.setTimeout(() => {
mapStatus$$.unsubscribe();
let status = SubjectStatus.Done;
try {
this.addCanvas(doc, canvas, margins);
} catch (err) {
status = SubjectStatus.Error;
this.messageService.error(
this.languageService.translate.instant(
'igo.geo.printForm.corsErrorMessageBody'
),
this.languageService.translate.instant(
'igo.geo.printForm.corsErrorMessageHeader'
),
'print'
);
}
this.renderMap(map, mapSize, extent);
status$.next(status);
}, 200);
});