UNPKG

@rcsb/rcsb-saguaro-app

Version:
20 lines 1.1 kB
import { __awaiter } from "tslib"; export class AnnotationsBlockFactory { constructor(annotationBlockManager, annotationTrackFactory, trackModifier) { this.annotationsBlockData = new Array(); this.annotationBlockManager = annotationBlockManager; this.trackFactory = annotationTrackFactory; this.trackConfigModifier = trackModifier; } getBlock(annotationsRequestContext, annotations) { return __awaiter(this, void 0, void 0, function* () { yield this.annotationBlockManager.setData(annotationsRequestContext, annotations); yield Promise.all(this.annotationBlockManager.getTracks().map((track) => __awaiter(this, void 0, void 0, function* () { var _a; this.annotationsBlockData.push(Object.assign(Object.assign({}, yield this.trackFactory.getTrack(track)), yield ((_a = this.trackConfigModifier) === null || _a === void 0 ? void 0 : _a.call(this, track)))); }))); return this.annotationsBlockData; }); } } //# sourceMappingURL=AnnotationsBlockFactory.js.map