Skip to content

Commit

Permalink
Add support for parsing and displaying Aviary style annotations: labe…
Browse files Browse the repository at this point in the history
…l/value pairs, multiple annotations for single time-point
  • Loading branch information
Dananji committed Jan 3, 2025
1 parent e0064dd commit 87c6d6f
Show file tree
Hide file tree
Showing 3 changed files with 376 additions and 74 deletions.
31 changes: 16 additions & 15 deletions src/components/MarkersDisplay/Annotations/AnnotationsDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,23 @@ const AnnotationsDisplay = ({ annotations, canvasIndex, duration, displayMotivat
/>
</div>
<div className="ramp--annotations__content" tabIndex={0}>
{hasDisplayAnnotations
? displayedAnnotations != undefined && displayedAnnotations?.length > 0 && (
<ul>
{displayedAnnotations.map((annotation, index) => {
return (
<AnnotationRow
key={index}
annotation={annotation}
displayMotivations={displayMotivations}
/>
);
})}
</ul>
)
: <p>{`No Annotations with ${displayMotivations.join('/')} motivation.`}</p>
{hasDisplayAnnotations && displayedAnnotations != undefined && displayedAnnotations?.length > 0 && (
<ul>
{displayedAnnotations.map((annotation, index) => {
return (
<AnnotationRow
key={index}
annotation={annotation}
displayMotivations={displayMotivations}
/>
);
})}
</ul>
)
}
{!hasDisplayAnnotations && displayMotivations?.length != 0 && (
<p>{`No Annotations with ${displayMotivations.join('/')} motivation.`}</p>
)}
</div>
</div>
);
Expand Down
Loading

0 comments on commit 87c6d6f

Please sign in to comment.