Skip to content

Commit 072a714

Browse files
committed
update(image-annotator-react): remove dead code
1 parent 570c060 commit 072a714

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

packages/image-annotator-react/src/ImageAnnotator.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -491,21 +491,6 @@ function ForwardAnnotator(
491491
[updateAnnotationsWithGlobal],
492492
);
493493

494-
const onAnnotationDelete = useCallback(
495-
(restAnnotations: AnnotationWithTool[]) => {
496-
const annotationGroupByTool: AllAnnotationMapping = {};
497-
498-
restAnnotations.forEach((item) => {
499-
annotationGroupByTool[item.id] = item;
500-
});
501-
502-
updateAnnotationsWithGlobal(() => {
503-
return annotationGroupByTool;
504-
});
505-
},
506-
[updateAnnotationsWithGlobal],
507-
);
508-
509494
const onAnnotationChange = useCallback(
510495
(_annotation: AnnotationWithTool, skipHistory?: boolean) => {
511496
updateAnnotationsWithGlobal((pre) => {

packages/image-annotator-react/src/Toolbar/index.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,6 @@ export function AnnotatorToolbar({ right }: IToolbarInEditorProps) {
7676
undo();
7777
}, [undo]);
7878

79-
const handleUndo = useCallback(() => {
80-
if (dragModalRef.current?.getVisibility()) {
81-
return;
82-
}
83-
84-
undo();
85-
}, [undo]);
86-
8779
const handleToolChange = (tool: ToolName) => () => {
8880
engine.switch(tool, memorizeToolLabel.current?.[tool]?.value);
8981
};

0 commit comments

Comments
 (0)