Skip to content

Commit

Permalink
segments pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaksei-chareshneu committed Jun 27, 2024
1 parent b74c0b5 commit 7b41334
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions molstar-extension/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ export async function actionShowSegments(segmentKeys: string[], model: VolsegEnt
const allExistingGeometricSegmentationIds = model.metadata.value!.raw.grid.geometric_segmentation!.segmentation_ids;
if (segmentKeys.length === 0) {
for (const id of allExistingLatticeSegmentationIds) {
await showSegments([], id, 'lattice', model);
await showSegments({ segmentIds: [], segmentationId: id, kind: 'lattice' }, model);
}
for (const id of allExistingMeshSegmentationIds) {
await showSegments([], id, 'mesh', model);
await showSegments({ segmentIds: [], segmentationId: id, kind: 'mesh' }, model);
}
for (const id of allExistingGeometricSegmentationIds) {
await showSegments([], id, 'primitive', model);
await showSegments({ segmentIds: [], segmentationId: id, kind: 'primitive' }, model);
}
}
const parsedSegmentKeys = segmentKeys.map(
Expand Down Expand Up @@ -93,7 +93,7 @@ export async function _actionShowSegments(parsedSegmentKeys: ParsedSegmentKey[],
}
const promises: Promise<void>[] = [];
SegmentationIdsToSegmentIds.forEach((value, key) => {
promises.push(showSegments(value, key, kind, model));
promises.push(showSegments({ segmentIds: value, segmentationId: key, kind: kind }, model));
});
await Promise.all(promises);
}
Expand Down

0 comments on commit 7b41334

Please sign in to comment.