From 63989922135dd5db2b24e2a670ae898296430d18 Mon Sep 17 00:00:00 2001 From: Takhyun Kim Date: Tue, 21 Feb 2023 10:23:15 +0900 Subject: [PATCH] fix(viewer): rename element to annotation of AnnotationViewer Component --- .../AnnotationsViewer/AnnotationViewer.types.ts | 2 +- .../components/AnnotationsViewer/index.tsx | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/insight-viewer/src/Annotation/components/AnnotationsViewer/AnnotationViewer.types.ts b/libs/insight-viewer/src/Annotation/components/AnnotationsViewer/AnnotationViewer.types.ts index 8beba59ae..cf692ce0a 100644 --- a/libs/insight-viewer/src/Annotation/components/AnnotationsViewer/AnnotationViewer.types.ts +++ b/libs/insight-viewer/src/Annotation/components/AnnotationsViewer/AnnotationViewer.types.ts @@ -37,7 +37,7 @@ export interface AnnotationsViewerProps { export interface AnnotationViewerProps extends Omit { - element: Annotation + annotation: Annotation showOutline: boolean showElementLabel: boolean } diff --git a/libs/insight-viewer/src/Annotation/components/AnnotationsViewer/index.tsx b/libs/insight-viewer/src/Annotation/components/AnnotationsViewer/index.tsx index 7f25e838a..1a763778a 100644 --- a/libs/insight-viewer/src/Annotation/components/AnnotationsViewer/index.tsx +++ b/libs/insight-viewer/src/Annotation/components/AnnotationsViewer/index.tsx @@ -17,7 +17,7 @@ const annotationStyle: React.CSSProperties = { pointerEvents: 'auto', } function AnnotationViewer({ - element, + annotation, showOutline, showElementLabel, hoveredAnnotation, @@ -29,7 +29,7 @@ function AnnotationViewer({ const viewerProps = { showOutline, showLabel: showElementLabel, - isHovered: hoveredAnnotation?.id === element.id, + isHovered: hoveredAnnotation?.id === annotation.id, } const handleAnnotationClick = () => { @@ -39,12 +39,12 @@ function AnnotationViewer({ onFocus(null) } - onClick(element) + onClick(annotation) } const handleAnnotationFocus = () => { if (!onFocus) return - onFocus(element) + onFocus(annotation) } const handleAnnotationFocusOut = () => { @@ -53,14 +53,14 @@ function AnnotationViewer({ } const { drawableAnnotation } = useCreatingDrawableAnnotation({ - annotation: element, + annotation: annotation, pixelToCanvas, }) return (