diff --git a/packages/lb-annotation/src/utils/tool/EnhanceCommonToolUtils.ts b/packages/lb-annotation/src/utils/tool/EnhanceCommonToolUtils.ts index 2fcb940b8..fd486c54a 100644 --- a/packages/lb-annotation/src/utils/tool/EnhanceCommonToolUtils.ts +++ b/packages/lb-annotation/src/utils/tool/EnhanceCommonToolUtils.ts @@ -14,6 +14,7 @@ import PointOperation from '../../core/toolOperation/pointOperation'; import TextToolOperation from '../../core/toolOperation/TextToolOperation'; import SegmentByRect from '../../core/toolOperation/segmentByRect'; import CommonToolUtils from './CommonToolUtils'; +import ScribbleTool from '@/core/toolOperation/ScribbleTool'; const getCurrentOperation = (toolName: EToolName | ECheckModel) => { switch (toolName) { @@ -34,6 +35,8 @@ const getCurrentOperation = (toolName: EToolName | ECheckModel) => { return PointOperation; case EToolName.Text: return TextToolOperation; + case EToolName.ScribbleTool: + return ScribbleTool; default: throw new Error('not match tool'); } diff --git a/packages/lb-components/src/views/MainView/annotationOperation/index.tsx b/packages/lb-components/src/views/MainView/annotationOperation/index.tsx index 2a0eaece4..8a750a4f8 100644 --- a/packages/lb-components/src/views/MainView/annotationOperation/index.tsx +++ b/packages/lb-components/src/views/MainView/annotationOperation/index.tsx @@ -12,7 +12,6 @@ import useSize from '@/hooks/useSize'; import { InitToolStyleConfig } from '@/store/toolStyle/actionCreators'; import { AnnotationEngine, ImgUtils } from '@labelbee/lb-annotation'; import { i18n } from '@labelbee/lb-utils'; -import { AppProps } from '@/App'; import { IStepInfo } from '@/types/step'; import StepUtils from '@/utils/StepUtils'; diff --git a/packages/lb-components/src/views/MainView/sidebar/SwitchAttributeList/index.tsx b/packages/lb-components/src/views/MainView/sidebar/SwitchAttributeList/index.tsx index 9ff2f5b2a..895248a52 100644 --- a/packages/lb-components/src/views/MainView/sidebar/SwitchAttributeList/index.tsx +++ b/packages/lb-components/src/views/MainView/sidebar/SwitchAttributeList/index.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useRef, useCallback } from 'react'; +import React, { useState, useEffect, useRef } from 'react'; import { connect } from 'react-redux'; import { AppState } from 'src/store'; import { GraphToolInstance } from 'src/store/annotation/types'; @@ -37,14 +37,6 @@ const SwitchAttributeList: React.FC = (props) => { }; }, [toolInstance, listRef]); - const attributeChanged = useCallback( - (v: string) => { - toolInstance.setDefaultAttribute(v); - forceRender((s) => s + 1); - }, - [toolInstance], - ); - if (!props.stepInfo) { return null; } diff --git a/packages/lb-components/src/views/MainView/toolFooter/index.tsx b/packages/lb-components/src/views/MainView/toolFooter/index.tsx index 2b81244ba..277dcb984 100644 --- a/packages/lb-components/src/views/MainView/toolFooter/index.tsx +++ b/packages/lb-components/src/views/MainView/toolFooter/index.tsx @@ -17,8 +17,6 @@ import { cTool } from '@labelbee/lb-annotation'; const { EPointCloudName } = cTool; -const { EPointCloudName } = cTool; - export type FooterTheme = 'light' | 'dark'; interface IProps { totalPage: number;