Skip to content

Commit

Permalink
feat(viewer): apply data attribute to AnnotationViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
LTakhyunKim committed Oct 12, 2023
1 parent 29b74fb commit 4984f2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/annotation/src/components/AnnotationViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function AnnotationViewer({

if (!drawableAnnotation) return null

const { type } = drawableAnnotation
const { type, dataAttrs } = drawableAnnotation

return (
<g
Expand All @@ -82,6 +82,7 @@ export function AnnotationViewer({
onMouseOver={handleAnnotationMouseOver}
onMouseLeave={handleAnnotationMouseLeave}
style={annotationStyle}
{...dataAttrs}
>
{type === 'polygon' && <PolygonViewer annotation={drawableAnnotation} {...viewerProps} />}
{(type === 'freeLine' || type === 'line' || type === 'arrowLine') && (
Expand Down

0 comments on commit 4984f2b

Please # to comment.