Skip to content

Commit

Permalink
try non async
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Oct 2, 2023
1 parent 315f2e9 commit 7c4d4bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/labeling/labelReview.js
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ function labelAnnotToHtml(annot){
}

// only works for square labels
async function getLabelInfo(e) {
function getLabelInfo(e) {
const img_point = $CAMIC.viewer.viewport.viewportToImageCoordinates($CAMIC.viewer.viewport.pointFromPixel(e.position, true));
let matched_labels = $D.ROIs.filter((label)=>{
if (label.properties.x < img_point.x && label.properties.y < img_point.y) {
Expand All @@ -852,7 +852,8 @@ async function getLabelInfo(e) {
// render relevant annotations
let annots = [];
for (let label of matched_labels){
annots = await $CAMIC.store.findLabeling({'creator': $USER, 'parent': label._id.$oid});
$CAMIC.store.findLabeling({'creator': $USER, 'parent': label._id.$oid}).then(x=>{
document.getElementById('annot_review').innerHTML += x.join('<br/><hr/><br/>');
});
}
document.getElementById('annot_review').innerHTML = annots.join('<br/><hr/><br/>');
}

0 comments on commit 7c4d4bd

Please sign in to comment.