@labelbee/lb-components 1.9.0-alpha.5 → 1.9.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/types/components/AnnotationView/index.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +1 -1
- package/dist/types/components/videoPlayer/types.d.ts +1 -1
- package/dist/types/store/annotation/types.d.ts +3 -3
- package/dist/types/store/imgAttribute/types.d.ts +1 -1
- package/dist/types/store/index.d.ts +1 -1
- package/dist/types/store/toolStyle/types.d.ts +1 -1
- package/dist/types/utils/dom.d.ts +2 -2
- package/dist/types/views/MainView/toolFooter/FooterPopover.d.ts +1 -1
- package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloudBackView.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/index.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/package.json +3 -3
- package/es/App.js.map +0 -1
- package/es/assets/annotation/common/icon_adapt.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_adapt_black.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_back.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_backA.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_clear.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_clearSmall.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_clearSmall_a.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_clear_a.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_invalid.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_invalid_a.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_next.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_nextA.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_r.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_rA.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_save.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_saveA.svg.js.map +0 -1
- package/es/assets/annotation/image/brightness.svg.js.map +0 -1
- package/es/assets/annotation/image/contrast.svg.js.map +0 -1
- package/es/assets/annotation/image/icon_yuantu.svg.js.map +0 -1
- package/es/assets/annotation/image/saturation.svg.js.map +0 -1
- package/es/assets/annotation/lineTool/icon_line.svg.js.map +0 -1
- package/es/assets/annotation/lineTool/icon_line_a.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/copy.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/nextBox.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/nodata.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/patse.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/prevBox.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/selectAll.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/unitAttribute.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/unitAttributeHover.svg.js.map +0 -1
- package/es/assets/annotation/pointTool/icon_point.svg.js.map +0 -1
- package/es/assets/annotation/pointTool/icon_point_a.svg.js.map +0 -1
- package/es/assets/annotation/polygonTool/icon_polygon.svg.js.map +0 -1
- package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js.map +0 -1
- package/es/assets/annotation/rectTool/icon_rect.svg.js.map +0 -1
- package/es/assets/annotation/rectTool/icon_rectPattern.svg.js +0 -1
- package/es/assets/annotation/rectTool/icon_rectPattern.svg.js.map +0 -1
- package/es/assets/annotation/rectTool/icon_rect_a.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_segment.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js.map +0 -1
- package/es/assets/annotation/video/icon_keyboard_h.svg.js.map +0 -1
- package/es/assets/attributeIcon/eraser.svg.js.map +0 -1
- package/es/assets/attributeIcon/eraser_a.svg.js.map +0 -1
- package/es/assets/attributeIcon/pen.svg.js.map +0 -1
- package/es/assets/attributeIcon/pen_a.svg.js.map +0 -1
- package/es/assets/attributeIcon/zoomUp.svg.js.map +0 -1
- package/es/assets/toolStyle/icon_border.svg.js.map +0 -1
- package/es/assets/toolStyle/icon_borderColor.svg.js.map +0 -1
- package/es/assets/toolStyle/icon_opacityFill.svg.js.map +0 -1
- package/es/assets/toolStyle/icon_opacityStroke.svg.js.map +0 -1
- package/es/components/AnnotationView/index.js.map +0 -1
- package/es/components/AnnotationView/pointCloudAnnotationView.js.map +0 -1
- package/es/components/ImageError/index.js +0 -1
- package/es/components/ImageError/index.js.map +0 -1
- package/es/components/annotationStepPopover/index.js.map +0 -1
- package/es/components/attributeList/index.js.map +0 -1
- package/es/components/checkboxList/index.js.map +0 -1
- package/es/components/colorTag/index.js.map +0 -1
- package/es/components/customAntd/IconWithText/index.js.map +0 -1
- package/es/components/customResizeHook/index.js.map +0 -1
- package/es/components/fileException/FileError.js.map +0 -1
- package/es/components/fileException/FileInvalid.js.map +0 -1
- package/es/components/fileException/index.js.map +0 -1
- package/es/components/pointCloudView/PointCloud2DView.js.map +0 -1
- package/es/components/pointCloudView/PointCloud3DView.js.map +0 -1
- package/es/components/pointCloudView/PointCloudBackView.js.map +0 -1
- package/es/components/pointCloudView/PointCloudContext.js.map +0 -1
- package/es/components/pointCloudView/PointCloudInfos.js.map +0 -1
- package/es/components/pointCloudView/PointCloudLayout.js.map +0 -1
- package/es/components/pointCloudView/PointCloudListener.js.map +0 -1
- package/es/components/pointCloudView/PointCloudSideView.js.map +0 -1
- package/es/components/pointCloudView/PointCloudTopView.js.map +0 -1
- package/es/components/pointCloudView/components/EmptyPage/index.js.map +0 -1
- package/es/components/pointCloudView/components/UnifyParamsModal/index.js.map +0 -1
- package/es/components/pointCloudView/hooks/useAttribute.js.map +0 -1
- package/es/components/pointCloudView/hooks/useBoxes.js.map +0 -1
- package/es/components/pointCloudView/hooks/useConfig.js.map +0 -1
- package/es/components/pointCloudView/hooks/useHistory.js.map +0 -1
- package/es/components/pointCloudView/hooks/usePointCloudBoxes.js +0 -119
- package/es/components/pointCloudView/hooks/usePointCloudBoxes.js.map +0 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js.map +0 -1
- package/es/components/pointCloudView/hooks/usePolygon.js.map +0 -1
- package/es/components/pointCloudView/hooks/useRotate.js.map +0 -1
- package/es/components/pointCloudView/hooks/useSingleBox.js.map +0 -1
- package/es/components/pointCloudView/hooks/useStatus.js.map +0 -1
- package/es/components/pointCloudView/hooks/useZoom.js.map +0 -1
- package/es/components/pointCloudView/index.js.map +0 -1
- package/es/components/pointCloudView/useSingleBox.js +0 -44
- package/es/components/pointCloudView/useSingleBox.js.map +0 -1
- package/es/components/videoAnnotate/index.js.map +0 -1
- package/es/components/videoPlayer/TagToolInstanceAdaptor.js.map +0 -1
- package/es/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js.map +0 -1
- package/es/components/videoPlayer/VideoTagLayer.js.map +0 -1
- package/es/components/videoPlayer/components/controller/index.js.map +0 -1
- package/es/components/videoPlayer/index.js.map +0 -1
- package/es/components/videoPlayer/utils.js.map +0 -1
- package/es/configureStore.js.map +0 -1
- package/es/constant/index.js.map +0 -1
- package/es/constant/styleString.js.map +0 -1
- package/es/data/Style.js.map +0 -1
- package/es/data/enums/AnnotationSize.js.map +0 -1
- package/es/data/enums/ToolType.js.map +0 -1
- package/es/hooks/annotation.js.map +0 -1
- package/es/hooks/useRafState.js.map +0 -1
- package/es/hooks/useRefCache.js.map +0 -1
- package/es/hooks/useSafeSate.js.map +0 -1
- package/es/hooks/useSize.js.map +0 -1
- package/es/hooks/useUnmountedRef.js.map +0 -1
- package/es/index.js.map +0 -1
- package/es/store/Actions.js.map +0 -1
- package/es/store/annotation/actionCreators.js.map +0 -1
- package/es/store/annotation/map.js.map +0 -1
- package/es/store/annotation/reducer.js.map +0 -1
- package/es/store/annotation/selectors.js.map +0 -1
- package/es/store/ctx.js.map +0 -1
- package/es/store/imgAttribute/actionCreators.js.map +0 -1
- package/es/store/imgAttribute/reducer.js.map +0 -1
- package/es/store/index.js.map +0 -1
- package/es/store/toolStyle/actionCreators.js.map +0 -1
- package/es/store/toolStyle/reducer.js.map +0 -1
- package/es/utils/AnnotationDataUtils.js.map +0 -1
- package/es/utils/ConfigUtils.js.map +0 -1
- package/es/utils/PageOperator.js.map +0 -1
- package/es/utils/StepUtils.js.map +0 -1
- package/es/utils/TextUtils.js.map +0 -1
- package/es/utils/ToolStyleUtils.js.map +0 -1
- package/es/utils/ToolUtils.js.map +0 -1
- package/es/utils/data.js.map +0 -1
- package/es/utils/dom.js.map +0 -1
- package/es/utils/index.js.map +0 -1
- package/es/views/MainView/annotationOperation/index.js.map +0 -1
- package/es/views/MainView/annotationTips/index.js.map +0 -1
- package/es/views/MainView/index.js.map +0 -1
- package/es/views/MainView/sidebar/AnnotationText/index.js.map +0 -1
- package/es/views/MainView/sidebar/ClearIcon/index.js.map +0 -1
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js.map +0 -1
- package/es/views/MainView/sidebar/GeneralOperation/OperationList.js +0 -77
- package/es/views/MainView/sidebar/GeneralOperation/OperationList.js.map +0 -1
- package/es/views/MainView/sidebar/GeneralOperation/index.js.map +0 -1
- package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js.map +0 -1
- package/es/views/MainView/sidebar/ImgAttributeInfo/index.js.map +0 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js.map +0 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js.map +0 -1
- package/es/views/MainView/sidebar/ScribbleSidebar/index.js.map +0 -1
- package/es/views/MainView/sidebar/SwitchAttributeList/index.js.map +0 -1
- package/es/views/MainView/sidebar/TagSidebar/index.js.map +0 -1
- package/es/views/MainView/sidebar/TextAreaFormat/index.js.map +0 -1
- package/es/views/MainView/sidebar/TextToolSidebar/index.js.map +0 -1
- package/es/views/MainView/sidebar/ToolIcons.js.map +0 -1
- package/es/views/MainView/sidebar/ToolStyle/index.js.map +0 -1
- package/es/views/MainView/sidebar/index.js.map +0 -1
- package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterPopover.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/index.js.map +0 -1
- package/es/views/MainView/toolFooter/HiddenTips/index.js.map +0 -1
- package/es/views/MainView/toolFooter/PageNumber/index.js.map +0 -1
- package/es/views/MainView/toolFooter/Pagination.js.map +0 -1
- package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js.map +0 -1
- package/es/views/MainView/toolFooter/ZoomController/index.js.map +0 -1
- package/es/views/MainView/toolFooter/index.js.map +0 -1
- package/es/views/MainView/toolHeader/ExportData/index.js.map +0 -1
- package/es/views/MainView/toolHeader/StepSwitch/index.js.map +0 -1
- package/es/views/MainView/toolHeader/headerOption/index.js.map +0 -1
- package/es/views/MainView/toolHeader/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var dom=require("../../utils/dom.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),classNames=require("classnames"),React=require("react"),PointCloudLayout=require("./PointCloudLayout.js"),PointCloudContext=require("./PointCloudContext.js"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),index=require("../../utils/index.js"),useSingleBox=require("./hooks/useSingleBox.js"),antd=require("antd"),useSize=require("../../hooks/useSize.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),classNames=require("classnames"),React=require("react"),PointCloudLayout=require("./PointCloudLayout.js"),PointCloudContext=require("./PointCloudContext.js"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),index=require("../../utils/index.js"),useSingleBox=require("./hooks/useSingleBox.js"),antd=require("antd"),useSize=require("../../hooks/useSize.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,o,n)=>o in e?__defProp(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,__spreadValues=(e,o)=>{for(var n in o||(o={}))__hasOwnProp.call(o,n)&&__defNormalProp(e,n,o[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(o))__propIsEnum.call(o,n)&&__defNormalProp(e,n,o[n]);return e},__spreadProps=(e,o)=>__defProps(e,__getOwnPropDescs(o));const pointCloudID="LABELBEE-POINTCLOUD",PointCloud3DContext=React__default.default.createContext({isActive:!1,setTarget3DView:()=>{},reset3DView:()=>{},followTopView:()=>{}}),PointCloudViewIcon=({perspectiveView:e})=>{const{isActive:o,setTarget3DView:n}=React.useContext(PointCloud3DContext),a=m=>classNames__default.default({[dom.getClassName("point-cloud-3d-view",m)]:!0,active:o});return React__default.default.createElement("span",{onClick:()=>{n(lbUtils.EPerspectiveView[e])},className:a(e.toLocaleLowerCase())})},PointCloud3DSideBar=()=>{const{reset3DView:e,followTopView:o}=React.useContext(PointCloud3DContext),{t:n}=reactI18next.useTranslation();return React__default.default.createElement("div",{className:dom.getClassName("point-cloud-3d-sidebar")},React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Top"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Front"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Left"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Back"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Right"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"LFT"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"RBT"}),React__default.default.createElement(antd.Tooltip,{title:n("CameraFollowTopView")},React__default.default.createElement("span",{onClick:()=>{o()},className:dom.getClassName("point-cloud-3d-view","followTop")})),React__default.default.createElement("span",{onClick:()=>{e()},className:dom.getClassName("point-cloud-3d-view","reset")}))},PointCloud3D=({currentData:e,config:o})=>{var n;const a=React.useContext(PointCloudContext.PointCloudContext),[m,w]=React.useState(!0),d=React.useRef(null),{initPointCloud3d:p}=usePointCloudViews.usePointCloudViews(),s=useSize(d),{t:v}=reactI18next.useTranslation();React.useEffect(()=>{!a.mainViewInstance||p==null||p(s)},[s]);const{selectedBox:u}=useSingleBox.useSingleBox(),f=t=>{var i;const r=u==null?void 0:u.info;if(r){const l=__spreadValues({},r.center);l.x=l.x-.01,l.z=10;const c=t===lbUtils.EPerspectiveView.Top;(i=a.mainViewInstance)==null||i.updateCameraByBox(r,t,c?l:void 0)}},C=()=>{var t;(t=a.mainViewInstance)==null||t.resetCamera()},V=()=>{var t,i;const r=(t=a.topViewInstance)==null?void 0:t.pointCloudInstance.camera;r&&((i=a.mainViewInstance)==null||i.applyCameraTarget(r))};React.useEffect(()=>{if(d.current&&(e==null?void 0:e.url)){let t=a.mainViewInstance;if(!t&&s.width){const i={left:-s.width/2,right:s.width/2,top:s.height/2,bottom:-s.height/2,near:100,far:-100};t=new lbAnnotation.PointCloud({container:d.current,isOrthographicCamera:!0,orthographicParams:i,config:o}),a.setMainViewInstance(t)}}},[s]),React.useEffect(()=>{var t;if(d.current&&(e==null?void 0:e.url)&&e.result&&a.mainViewInstance){let i=a.mainViewInstance;const r=lbUtils.PointCloudUtils.getBoxParamsFromResultList(e.result);r.forEach(l=>{var c;const _=(c=lbUtils.toolStyleConverter.getColorFromConfig({attribute:l.attribute},__spreadProps(__spreadValues({},o),{attributeConfigurable:!0}),{}))==null?void 0:c.hex;i==null||i.generateBox(l,_)}),a.setPointCloudResult(r),a.setPointCloudValid((t=index.jsonParser(e.result))==null?void 0:t.valid)}},[e,a.mainViewInstance]),React.useEffect(()=>{var t,i,r,l;if(u){f(lbUtils.EPerspectiveView.Top);const c=(r=(i=(t=a.topViewInstance)==null?void 0:t.pointCloudInstance)==null?void 0:i.camera.zoom)!=null?r:1;(l=a.mainViewInstance)==null||l.updateCameraZoom(c)}},[u]);const P=React.useMemo(()=>({reset3DView:C,setTarget3DView:f,isActive:!!u,followTopView:V}),[u,a.mainViewInstance]),g=React__default.default.createElement("div",null,React__default.default.createElement("span",{style:{marginRight:8}},v("ShowArrows")),React__default.default.createElement(antd.Switch,{size:"small",checked:m,onChange:t=>{var i;w(t),(i=a.mainViewInstance)==null||i.setShowDirection(t)}}));return React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-3d-container"),title:v("3DView"),toolbar:g,style:{height:e.mappingImgList&&((n=e.mappingImgList)==null?void 0:n.length)>0?"55%":"100%"}},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-3d-content")},React__default.default.createElement(PointCloud3DContext.Provider,{value:P},React__default.default.createElement(PointCloud3DSideBar,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-3d-view"),id:pointCloudID,ref:d})))};var PointCloud3DView=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloud3D);module.exports=PointCloud3DView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),dom=require("../../utils/dom.js"),PointCloudLayout=require("./PointCloudLayout.js"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),useSingleBox=require("./hooks/useSingleBox.js"),PointCloudInfos=require("./PointCloudInfos.js"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js"),index=require("./components/EmptyPage/index.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(
|
|
1
|
+
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),dom=require("../../utils/dom.js"),PointCloudLayout=require("./PointCloudLayout.js"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),useSingleBox=require("./hooks/useSingleBox.js"),PointCloudInfos=require("./PointCloudInfos.js"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js"),index=require("./components/EmptyPage/index.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var React__default=_interopDefaultLegacy(React);const TransferCanvas2WorldOffset=(n,a,r=1)=>{const{width:e,height:t}=a,o={x:n.x+e*r/2,y:n.y+t*r/2},l={x:a.width/2,y:a.height/2};return{offsetX:(l.x-o.x)/r,offsetY:-(l.y-o.y)/r}},updateBackViewByCanvas2D=(n,a,r,e,t)=>{const{offsetX:o,offsetY:l}=TransferCanvas2WorldOffset(n,r,a);if(t.camera.zoom=a,n){const f=Math.cos(e.rotation),C=Math.sin(e.rotation),i=o*f,u=o*C,{x:s,y:c,z:d}=t.initCameraPosition;t.camera.position.set(s+u,c-i,d+l)}t.camera.updateProjectionMatrix(),t.render()},PointCloudSideView=({currentData:n,config:a,checkMode:r})=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),t=React.useRef(null),o=useSize(t),{selectedBox:l}=useSingleBox.useSingleBox(),{t:f}=reactI18next.useTranslation(),{backViewUpdateBox:C}=usePointCloudViews.usePointCloudViews();return React.useEffect(()=>{if(t.current){const i={width:t.current.clientWidth,height:t.current.clientHeight},u=new lbAnnotation.PointCloudAnnotation({container:t.current,size:i,polygonOperationProps:{showDirectionLine:!1,forbidAddNew:!0},config:a,checkMode:r});e.setBackViewInstance(u)}},[]),React.useEffect(()=>{if(!o||!e.backViewInstance)return;const{pointCloud2dOperation:i,pointCloudInstance:u}=e.backViewInstance;i.singleOn("renderZoom",(s,c)=>{!e.selectedPointCloudBox||updateBackViewByCanvas2D(c,s,o,e.selectedPointCloudBox,u)}),i.singleOn("dragMove",({currentPos:s,zoom:c})=>{!e.selectedPointCloudBox||updateBackViewByCanvas2D(s,c,o,e.selectedPointCloudBox,u)}),i.singleOn("updatePolygonByDrag",s=>{if(e.selectedIDs.length===1&&s.length===1){const{newPolygon:c,originPolygon:d}=s[0];c&&d&&C(c,d)}})},[e,o]),React.useEffect(()=>{var i;(i=e==null?void 0:e.backViewInstance)==null||i.initSize(o)},[o]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","back-view"),title:f("BackView"),toolbar:React__default.default.createElement(PointCloudInfos.SizeInfoForView,{perspectiveView:lbUtils.EPerspectiveView.Back})},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","bottom-view-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","core-instance"),ref:t}),!l&&React__default.default.createElement(index,null)))};var PointCloudBackView=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudSideView);module.exports=PointCloudBackView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("../PointCloudContext.js"),useSingleBox=require("./useSingleBox.js"),ctx=require("../../../store/ctx.js"),StepUtils=require("../../../utils/StepUtils.js"),index=require("../../../utils/index.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),antd=require("antd"),reactI18next=require("react-i18next"),useHistory=require("./useHistory.js"),usePolygon=require("./usePolygon.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,o,n)=>o in t?__defProp(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n,__spreadValues=(t,o)=>{for(var n in o||(o={}))__hasOwnProp.call(o,n)&&__defNormalProp(t,n,o[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(o))__propIsEnum.call(o,n)&&__defNormalProp(t,n,o[n]);return t},__spreadProps=(t,o)=>__defProps(t,__getOwnPropDescs(o)),__async=(t,o,n)=>new Promise((
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("../PointCloudContext.js"),useSingleBox=require("./useSingleBox.js"),ctx=require("../../../store/ctx.js"),StepUtils=require("../../../utils/StepUtils.js"),index=require("../../../utils/index.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),antd=require("antd"),reactI18next=require("react-i18next"),useHistory=require("./useHistory.js"),usePolygon=require("./usePolygon.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,o,n)=>o in t?__defProp(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n,__spreadValues=(t,o)=>{for(var n in o||(o={}))__hasOwnProp.call(o,n)&&__defNormalProp(t,n,o[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(o))__propIsEnum.call(o,n)&&__defNormalProp(t,n,o[n]);return t},__spreadProps=(t,o)=>__defProps(t,__getOwnPropDescs(o)),__async=(t,o,n)=>new Promise((u,e)=>{var s=d=>{try{c(n.next(d))}catch(C){e(C)}},g=d=>{try{c(n.throw(d))}catch(C){e(C)}},c=d=>d.done?u(d.value):Promise.resolve(d.value).then(s,g);c((n=n.apply(t,o)).next())});const DEFAULT_SCOPE=5,DEFAULT_RADIUS=90,PointCloudView={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},topViewPolygon2PointCloud=(t,o,n,u,e)=>{const[s,g,c,d]=t.pointList.map(P=>lbUtils.PointCloudUtils.transferCanvas2World(P,o)),C=lbAnnotation.MathUtils.getLineCenterPoint([s,c]),h=lbAnnotation.MathUtils.getLineLength(s,g),x=lbAnnotation.MathUtils.getLineLength(g,c),O=lbAnnotation.MathUtils.getRadiusFromQuadrangle(t.pointList);let m=0,w=1,y={};if(n){const P=n.getSensesPointZAxisInPolygon([s,g,c,d]);m=(P.maxZ+P.minZ)/2,w=P.maxZ-P.minZ,y={count:P.zCount}}u&&(m=u.center.z,w=u.depth);const U={center:{x:C.x,y:C.y,z:m},width:x,height:h,depth:w,rotation:O,id:t.id},v=__spreadValues(u?__spreadValues(__spreadValues({},u),U):__spreadProps(__spreadValues({},U),{attribute:"",valid:!0}),y);return e&&Object.assign(v,e),v},sideViewPolygon2PointCloud=(t,o,n,u)=>{const[e,s,g]=t.pointList,[c,d,C]=o.pointList,h=lbAnnotation.MathUtils.getLineCenterPoint([e,g]),x=lbAnnotation.MathUtils.getLineCenterPoint([c,C]),m={x:{x:h.x-x.x,y:h.y-x.y}.x,y:0,z:h.y-x.y},w=lbAnnotation.MathUtils.getLineLength(e,s),y=lbAnnotation.MathUtils.getLineLength(c,d),U=w-y,v=lbAnnotation.MathUtils.getLineLength(s,g),P=lbAnnotation.MathUtils.getLineLength(d,C),I=v-P,{newBoxParams:b}=u.getNewBoxBySideUpdate(m,I,U,n);return b},backViewPolygon2PointCloud=(t,o,n,u)=>{const[e,s,g]=t.pointList,[c,d,C]=o.pointList,h=lbAnnotation.MathUtils.getLineCenterPoint([e,g]),x=lbAnnotation.MathUtils.getLineCenterPoint([c,C]),m={x:{x:h.x-x.x,y:h.y-x.y}.x,y:0,z:h.y-x.y},w=lbAnnotation.MathUtils.getLineLength(e,s),y=lbAnnotation.MathUtils.getLineLength(c,d),U=w-y,v=lbAnnotation.MathUtils.getLineLength(s,g),P=lbAnnotation.MathUtils.getLineLength(d,C),I=v-P;let{newBoxParams:b}=u.getNewBoxByBackUpdate(m,I,U,n);return b},synchronizeSideView=(t,o,n,u)=>{if(!n)return;const{pointCloud2dOperation:e,pointCloudInstance:s}=n;s.loadPCDFileByBox(u,t,{width:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:g}=s.updateOrthoCamera(t,lbUtils.EPerspectiveView.Left);s.setInitCameraPosition(g);const{polygon2d:c,zoom:d}=s.getBoxSidePolygon2DCoordinate(t);s.camera.zoom=d,s.camera.updateProjectionMatrix(),s.render(),e.initPosition(),e.zoomChangeOnCenter(d),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:c,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},synchronizeBackView=(t,o,n,u)=>{if(!n)return;const{pointCloud2dOperation:e,pointCloudInstance:s}=n;s.loadPCDFileByBox(u,t,{height:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:g}=s.updateOrthoCamera(t,lbUtils.EPerspectiveView.Back);s.setInitCameraPosition(g);const{polygon2d:c,zoom:d}=s.getBoxBackPolygon2DCoordinate(t);s.camera.zoom=d,s.camera.updateProjectionMatrix(),s.render(),e.initPosition(),e.zoomChangeOnCenter(d),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:c,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},synchronizeTopView=(t,o,n,u)=>{var e;if(!n||!u)return;u.generateBox(t,o.id),u.render();const{pointCloud2dOperation:s,pointCloudInstance:g}=n,{polygon2d:c}=g.getBoxTopPolygon2DCoordinate(t),d=[...s.polygonList],C=d.find(h=>h.id===o.id);C?C.pointList=c:d.push({id:o.id,pointList:c,textAttribute:"",isRect:!0,valid:(e=t.valid)!=null?e:!0}),s.setResultAndSelectedID(d,o.id)},usePointCloudViews=()=>{const t=React.useContext(PointCloudContext.PointCloudContext),{topViewInstance:o,sideViewInstance:n,backViewInstance:u,mainViewInstance:e,addPointCloudBox:s,setSelectedIDs:g,selectedIDs:c,pointCloudBoxList:d,hideAttributes:C}=t,{addHistory:h,initHistory:x,pushHistoryUnderUpdatePolygon:O}=useHistory.useHistory(),{selectedPolygon:m}=usePolygon.usePolygon(),{updateSelectedBox:w,updateSelectedBoxes:y,getPointCloudByID:U}=useSingleBox.useSingleBox(),{currentData:v,config:P}=ctx.useSelector(i=>{const{stepList:r,step:p,imgList:l,imgIndex:a}=i.annotation;return{currentData:l[a],config:index.jsonParser(StepUtils.getCurrentStepInfo(p,r).config)}}),I=ctx.useDispatch(),{selectedBox:b}=useSingleBox.useSingleBox(),{t:M}=reactI18next.useTranslation(),A=b==null?void 0:b.info;if(!o||!n||!u)return{topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{},backViewUpdateBox:()=>{}};const{pointCloudInstance:z}=o,T=i=>{e==null||e.generateBox(i),e==null||e.controls.update(),e==null||e.render()},R=({newPolygon:i,size:r,imgList:p,trackConfigurable:l,zoom:a})=>{var f;const L={attribute:(f=o.pointCloud2dOperation.defaultAttribute)!=null?f:""};l===!0&&Object.assign(L,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:[],extraBoxList:d})});const B=topViewPolygon2PointCloud(i,r,z,void 0,L),S=o==null?void 0:o.pointCloud2dOperation,V=B;if((P==null?void 0:P.lowerLimitPointsNumInBox)&&typeof B.count=="number"&&B.count<P.lowerLimitPointsNumInBox){antd.message.info(M("LowerLimitPointsNumInBox",{num:P.lowerLimitPointsNumInBox})),S.deletePolygon(B.id);return}const j=C.includes(i.attribute),_=s(V);j?g([]):(g(V.id),S.setSelectedIDs([i.id]),D(PointCloudView.Top,i,V,a,_)),h({newBoxParams:V})},q=(i,r)=>{const p=i!=null?i:b==null?void 0:b.info,l=o==null?void 0:o.pointCloud2dOperation;if(l.setSelectedIDs(c),c.length===0||!l)return;const a=l.selectedPolygon;if(c.length===1&&p){D(PointCloudView.Top,a,p,void 0,r);return}},k=(i,r,p)=>{if(A){let l,a;switch(p){case PointCloudView.Back:l=backViewPolygon2PointCloud;break;case PointCloudView.Side:l=sideViewPolygon2PointCloud;break;default:l=sideViewPolygon2PointCloud;break}if(a=l(i,r,A,n.pointCloudInstance),e){const{count:L}=e.getSensesPointZAxisInPolygon(lbAnnotation.getCuboidFromPointCloudBox(a).polygonPointList,[a.center.z-a.depth/2,a.center.z+a.depth/2]);a=__spreadProps(__spreadValues({},a),{count:L})}const f=w(a);return D(p,i,a,void 0,f),f}},H=(i,r)=>{k(i,r,PointCloudView.Side)},E=(i,r)=>{k(i,r,PointCloudView.Back)},F=(i,r)=>{if(m){const l=i[0].newPolygon;l.pointList=l.pointList.map(a=>lbUtils.PointCloudUtils.transferCanvas2World(a,r)),O(i[0].newPolygon);return}const p=i.map(({newPolygon:l})=>{const a=U(l.id);return topViewPolygon2PointCloud(l,r,o.pointCloudInstance,a)});if(p.length===1){const{newPolygon:l}=i[0],a=y(p);D(PointCloudView.Top,l,p[0],void 0,a)}else{const l=y(p);l&&t.syncAllViewPointCloudColor(l)}},D=(i,r,p,l,a)=>__async(void 0,null,function*(){const f=v==null?void 0:v.url;a&&(yield t.syncAllViewPointCloudColor(a));const L={[PointCloudView.Side]:()=>{synchronizeSideView(p,r,n,f)},[PointCloudView.Back]:()=>{u&&synchronizeBackView(p,r,u,f)},[PointCloudView.Top]:()=>{synchronizeTopView(p,r,o,e)}};Object.keys(L).forEach(B=>{B!==i&&L[B]()}),l&&(e==null||e.updateCameraZoom(l)),T(p)});return{topViewAddBox:R,topViewSelectedChanged:q,topViewUpdateBox:F,sideViewUpdateBox:H,backViewUpdateBox:E,pointCloudBoxListUpdated:i=>{o.updatePolygonList(i),e==null||e.generateBoxes(i)},initPointCloud3d:i=>{if(!e)return;const r={left:-i.width/2,right:i.width/2,top:i.height/2,bottom:-i.height/2,near:100,far:-100};e.initOrthographicCamera(r),e.initRenderer(),e.render()},updatePointCloudData:(...i)=>__async(void 0,[...i],function*(r=v){var p,l,a,f,L,B;if(!(r==null?void 0:r.url)||!e)return;actionCreators.SetPointCloudLoading(I,!0),yield e.loadPCDFile(r.url,(p=P==null?void 0:P.radius)!=null?p:DEFAULT_RADIUS),d.forEach(_=>{e==null||e.removeObjectByName(_.id)});let S=[],V=[];r.result?(S=lbUtils.PointCloudUtils.getBoxParamsFromResultList(r.result),V=lbUtils.PointCloudUtils.getPolygonListFromResultList(r.result),S.forEach(_=>{e==null||e.generateBox(_)}),t.syncAllViewPointCloudColor(S),t.setPointCloudResult(S),t.setPolygonList(V)):(t.setPointCloudResult([]),t.setPolygonList([])),x({pointCloudBoxList:S,polygonList:V}),e.updateTopCamera();const j=(a=(l=index.jsonParser(r.result))==null?void 0:l.valid)!=null?a:!0;t.setPointCloudValid(j),(f=t.sideViewInstance)==null||f.clearAllData(),(L=t.backViewInstance)==null||L.clearAllData(),o.updateData(r.url,r.result,{radius:(B=P==null?void 0:P.radius)!=null?B:DEFAULT_RADIUS}),actionCreators.SetPointCloudLoading(I,!1)})}};exports.synchronizeBackView=synchronizeBackView,exports.synchronizeSideView=synchronizeSideView,exports.synchronizeTopView=synchronizeTopView,exports.topViewPolygon2PointCloud=topViewPolygon2PointCloud,exports.usePointCloudViews=usePointCloudViews;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),index=require("../../views/MainView/toolFooter/AnnotatedAttributes/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PointCloudView=({imgList:e,drawLayerSlot:a,checkMode:t})=>e.length===0?null:React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,{checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),onContextMenu:l=>l.preventDefault()},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-wrapper")},React__default.default.createElement(index.AnnotatedAttributesPanelFixedLeft,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","left")},React__default.default.createElement(PointCloud2DView,null),React__default.default.createElement(PointCloud3DView,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right")},React__default.default.createElement(PointCloudTopView,{drawLayerSlot:a,checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right-bottom")},React__default.default.createElement(PointCloudSideView,
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),index=require("../../views/MainView/toolFooter/AnnotatedAttributes/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PointCloudView=({imgList:e,drawLayerSlot:a,checkMode:t})=>e.length===0?null:React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,{checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),onContextMenu:l=>l.preventDefault()},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-wrapper")},React__default.default.createElement(index.AnnotatedAttributesPanelFixedLeft,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","left")},React__default.default.createElement(PointCloud2DView,null),React__default.default.createElement(PointCloud3DView,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right")},React__default.default.createElement(PointCloudTopView,{drawLayerSlot:a,checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right-bottom")},React__default.default.createElement(PointCloudSideView,{checkMode:t}),React__default.default.createElement(PointCloudBackView,{checkMode:t})))),React__default.default.createElement(index.AnnotatedAttributesPanelFixedRight,null)))),mapStateToProps=e=>({imgList:e.annotation.imgList});var PointCloudView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudView);module.exports=PointCloudView$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index$1=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__spreadValues=(e,t)=>{for(var s in t||(t={}))__hasOwnProp.call(t,s)&&__defNormalProp(e,s,t[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(t))__propIsEnum.call(t,s)&&__defNormalProp(e,s,t[s]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,s)=>new Promise((I,u)=>{var A=T=>{try{O(s.next(T))}catch(C){u(C)}},p=T=>{try{O(s.throw(T))}catch(C){u(C)}},O=T=>T.done?I(T.value):Promise.resolve(T.value).then(A,p);O((s=s.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(s=>s.step===t),initialState={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,I)=>{if(I){const u=I.result;if(index$1.jsonParser(u)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:I}=e,u=StepUtils.getCurrentStepInfo(s,I),A=ConfigUtils.ConfigUtils.jsonParser(u.config);if(ToolUtils.isVideoTool(u==null?void 0:u.tool)||ToolUtils.isPointCloudTool(u==null?void 0:u.tool))return;const p=document.getElementById("toolContainer");if(!p)throw"Not exist dom named id-toolContainer";const O=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),T=new lbAnnotation.AnnotationEngine({container:p,toolName:u.tool,size:O,imgNode:t,config:A,style:JSON.parse(styleString)});return{toolInstance:T==null?void 0:T.toolInstance,annotationEngine:T}},LoadFileAndFileData=(e,t)=>(s,I)=>__async(void 0,null,function*(){const{stepList:u,step:A}=I().annotation,p=StepUtils.currentToolIsVideo(A,u),O=StepUtils.currentToolIsPointCloud(A,u);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),p||O){s(AfterVideoLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:I,imgList:u}=s().annotation;if(I){const A=yield I(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:A,index:e}})}}),AfterVideoLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,I)=>{var u;const{toolInstance:A,imgList:p}=I().annotation,O=(u=p==null?void 0:p[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(O).then(T=>{actionCreators.SetAnnotationLoading(s,!1),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:T,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(s,!1),A==null||A.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:I,step:u=1})=>{var A,p,O,T;const C=((A=t[s])==null?void 0:A.result)||"",[b,h,U]=(p=e==null?void 0:e.exportData())!=null?p:[],x=(T=(O=e==null?void 0:e.exportCustomData)==null?void 0:O.call(e))!=null?T:{},B=data.composeResultWithBasicImgInfo(C,h),w=data.composeResult(B,{step:u,stepList:I},{rect:b},x);return t.map((P,F)=>F===s?__spreadValues(__spreadProps(__spreadValues({},P),{result:w}),U):__spreadValues({},P))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,I,u,A,p,O,T,C,b,h,U,x,B,w,P,F,q,G,V,M,k,H;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,i=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:i})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:i,stepList:l,toolInstance:a,onSubmit:r,resultList:N}=e;if(!a||!n[o])return e;const c=((s=n[o])==null?void 0:s.result)||"",[,d,g]=(I=a==null?void 0:a.exportData())!=null?I:[],f=(A=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?A:{},v=data.composeResultWithBasicImgInfo(c,d),E=data.composeResult(v,{step:i,stepList:l},{rect:N},f),S=e.imgList.map((L,m)=>{if(m===o){const R=AnnotationDataUtils.dataCorrection(E,c,i,l);return __spreadValues(__spreadProps(__spreadValues({},L),{result:R}),g)}return L});if(((p=t.payload)==null?void 0:p.submitType)===index.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:S});r&&r([S[o]],(O=t.payload)==null?void 0:O.submitType,o,S);const D=calcStepProgress(S,i);return __spreadProps(__spreadValues({},e),{stepProgress:D,imgList:S})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:i}=e;return i==null||i(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:i,toolInstance:l,basicResultList:a}=e;if(!l)return e;const[r]=(T=l==null?void 0:l.exportData())!=null?T:[];let N=r;if((a==null?void 0:a.length)>0){const c=(C=a[o])==null?void 0:C.id,d=r.map(g=>__spreadProps(__spreadValues({},g),{sourceID:c}));N=___default.default.cloneDeep(i).filter(g=>g.sourceID!==c),N.push(...d)}return __spreadProps(__spreadValues({},e),{resultList:N,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:i,imgIndex:l,stepList:a,annotationEngine:r,resultList:N,basicResultList:c}=e;if(!n||!r)return e;const d=t.payload.basicIndex,g=(b=c[d])==null?void 0:b.id,f=index$1.jsonParser((h=i[l])==null?void 0:h.result),v=(N||[]).filter(R=>R.sourceID===g),E=getStepConfig(a,o),{dataSourceStep:S,tool:D}=E,L=getStepConfig(a,S);let m=[];return S&&D&&(m=(U=f[`step_${S}`])==null?void 0:U.result,(m==null?void 0:m.length)>0?(r==null||r.setBasicInfo(L.tool,m[d]),r==null||r.launchOperation()):(r==null||r.setBasicInfo(L.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(v),n==null||n.history.initRecord(v,!0),__spreadProps(__spreadValues({},e),{basicIndex:d})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:i,annotationEngine:l,stepList:a}=e;if(!i)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:N,imgNode:c,nextBasicIndex:d,imgError:g}=t.payload,f=d!=null?d:0,v=index$1.jsonParser((x=n[N])==null?void 0:x.result),E=v[`step_${r.step}`],S=!E,D={rotate:(B=v.rotate)!=null?B:0,valid:(w=v.valid)!=null?w:!0};c&&g!==!0?l==null||l.setImgNode(c,D):i==null||i.setValid(D.valid);const L=getStepConfig(a,r.step),{dataSourceStep:m,tool:R}=L,z=getStepConfig(a,m),K=m&&R,y=(F=(P=v[`step_${m}`])==null?void 0:P.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(E==null?void 0:E.result,i,L,y,S);if(l==null||l.launchOperation(),K&&((y==null?void 0:y.length)>0?l==null||l.setBasicInfo(z.tool,y[f]):(l==null||l.setBasicInfo(z.tool),l==null||l.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const $=(G=(q=y[f])==null?void 0:q.id)!=null?G:"",W=K?j.filter(X=>lbAnnotation.CommonToolUtils.isSameSourceID(X.sourceID,$)):j;i==null||i.history.initRecord(j,!0),i==null||i.setResult(W)}return __spreadProps(__spreadValues({},e),{imgIndex:N,basicIndex:f,basicResultList:y,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(V=t.payload.config)!=null?V:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:i,annotationEngine:l}=o;return __spreadProps(__spreadValues({},e),{toolInstance:i,annotationEngine:l})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(M=t.payload)==null?void 0:M.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:i}=e,l=[...i];return l[o]=__spreadValues(__spreadValues({},l[o]),n),__spreadProps(__spreadValues({},e),{imgList:l})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||n==null||n.updateRotate(),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(k=n==null?void 0:n.valid)!=null?k:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:i,step:l}=e;if(!n)return e;if(o===0||o>=i.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const a=i[o-1].result;if(!a)return e;const r=AnnotationDataUtils.copyResultChange(a,l,(H=i[o].result)!=null?H:"");i[o]=__spreadProps(__spreadValues({},i[o]),{result:r});const c=index$1.jsonParser(r)[`step_${l}`],d=(c==null?void 0:c.result)||[];return n==null||n.setResult(d),n==null||n.history.pushHistory(d),n==null||n.asyncData(i[o]),__spreadProps(__spreadValues({},e),{imgList:[...i]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:i}=t.payload;if(!o)return e;const l=getStepConfig(n,i);return o==null||o.setToolName(l.tool,l.config),__spreadProps(__spreadValues({},e),{step:i,toolInstance:o==null?void 0:o.toolInstance})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:i,imgList:l}=t.payload,{imgIndex:a,onSubmit:r}=e,N=[],c=l.map((d,g)=>{if(lbAnnotation.MathUtils.isInRange(g,i)){const f=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:d.result})});return N.push({imgIndex:g,newInfo:f}),f}return d});return r&&r([c[a]],index.ESubmitType.BatchUpdateTrackID,a,c,{updateImgList:N}),__spreadProps(__spreadValues({},e),{imgList:c})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:i}=t.payload,{imgList:l,imgIndex:a,onSubmit:r}=e,N=[],c=l.map((d,g)=>{if(lbAnnotation.MathUtils.isInRange(g,i)){const f=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:d.result})});return N.push({imgIndex:g,newInfo:f}),f}return d});return r&&r([c[a]],index.ESubmitType.BatchUpdateTrackID,a,c,{updateImgList:N}),__spreadProps(__spreadValues({},e),{imgList:c})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index$1=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__spreadValues=(e,t)=>{for(var s in t||(t={}))__hasOwnProp.call(t,s)&&__defNormalProp(e,s,t[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(t))__propIsEnum.call(t,s)&&__defNormalProp(e,s,t[s]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,s)=>new Promise((I,u)=>{var A=T=>{try{O(s.next(T))}catch(C){u(C)}},p=T=>{try{O(s.throw(T))}catch(C){u(C)}},O=T=>T.done?I(T.value):Promise.resolve(T.value).then(A,p);O((s=s.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(s=>s.step===t),initialState={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,I)=>{if(I){const u=I.result;if(index$1.jsonParser(u)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:I}=e,u=StepUtils.getCurrentStepInfo(s,I),A=ConfigUtils.ConfigUtils.jsonParser(u.config);if(ToolUtils.isVideoTool(u==null?void 0:u.tool)||ToolUtils.isPointCloudTool(u==null?void 0:u.tool))return;const p=document.getElementById("toolContainer");if(!p)throw"Not exist dom named id-toolContainer";const O=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),T=new lbAnnotation.AnnotationEngine({container:p,toolName:u.tool,size:O,imgNode:t,config:A,style:JSON.parse(styleString)});return{toolInstance:T==null?void 0:T.toolInstance,annotationEngine:T}},LoadFileAndFileData=(e,t)=>(s,I)=>__async(void 0,null,function*(){const{stepList:u,step:A}=I().annotation,p=StepUtils.currentToolIsVideo(A,u),O=StepUtils.currentToolIsPointCloud(A,u);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),p||O){s(AfterVideoLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:I,imgList:u}=s().annotation;if(I){const A=yield I(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:A,index:e}})}}),AfterVideoLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,I)=>{var u;const{toolInstance:A,imgList:p}=I().annotation,O=(u=p==null?void 0:p[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(O).then(T=>{actionCreators.SetAnnotationLoading(s,!1),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:T,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(s,!1),A==null||A.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:I,step:u=1})=>{var A,p,O,T;const C=((A=t[s])==null?void 0:A.result)||"",[b,h,U]=(p=e==null?void 0:e.exportData())!=null?p:[],x=(T=(O=e==null?void 0:e.exportCustomData)==null?void 0:O.call(e))!=null?T:{},B=data.composeResultWithBasicImgInfo(C,h),w=data.composeResult(B,{step:u,stepList:I},{rect:b},x);return t.map((P,F)=>F===s?__spreadValues(__spreadProps(__spreadValues({},P),{result:w}),U):__spreadValues({},P))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,I,u,A,p,O,T,C,b,h,U,x,B,w,P,F,q,G,V,M,k,H,z;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,l=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:l})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:l,stepList:i,toolInstance:a,onSubmit:r,resultList:N}=e;if(!a||!n[o])return e;const c=((s=n[o])==null?void 0:s.result)||"",[,d,g]=(I=a==null?void 0:a.exportData())!=null?I:[],f=(A=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?A:{},v=data.composeResultWithBasicImgInfo(c,d),E=data.composeResult(v,{step:l,stepList:i},{rect:N},f),S=e.imgList.map((L,m)=>{if(m===o){const R=AnnotationDataUtils.dataCorrection(E,c,l,i);return __spreadValues(__spreadProps(__spreadValues({},L),{result:R}),g)}return L});if(((p=t.payload)==null?void 0:p.submitType)===index.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:S});r&&r([S[o]],(O=t.payload)==null?void 0:O.submitType,o,S);const D=calcStepProgress(S,l);return __spreadProps(__spreadValues({},e),{stepProgress:D,imgList:S})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:l}=e;return l==null||l(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:l,toolInstance:i,basicResultList:a}=e;if(!i)return e;const[r]=(T=i==null?void 0:i.exportData())!=null?T:[];let N=r;if((a==null?void 0:a.length)>0){const c=(C=a[o])==null?void 0:C.id,d=r.map(g=>__spreadProps(__spreadValues({},g),{sourceID:c}));N=___default.default.cloneDeep(l).filter(g=>g.sourceID!==c),N.push(...d)}return __spreadProps(__spreadValues({},e),{resultList:N,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:l,imgIndex:i,stepList:a,annotationEngine:r,resultList:N,basicResultList:c}=e;if(!n||!r)return e;const d=t.payload.basicIndex,g=(b=c[d])==null?void 0:b.id,f=index$1.jsonParser((h=l[i])==null?void 0:h.result),v=(N||[]).filter(R=>R.sourceID===g),E=getStepConfig(a,o),{dataSourceStep:S,tool:D}=E,L=getStepConfig(a,S);let m=[];return S&&D&&(m=(U=f[`step_${S}`])==null?void 0:U.result,(m==null?void 0:m.length)>0?(r==null||r.setBasicInfo(L.tool,m[d]),r==null||r.launchOperation()):(r==null||r.setBasicInfo(L.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(v),n==null||n.history.initRecord(v,!0),__spreadProps(__spreadValues({},e),{basicIndex:d})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:l,annotationEngine:i,stepList:a}=e;if(!l)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:N,imgNode:c,nextBasicIndex:d,imgError:g}=t.payload,f=d!=null?d:0,v=index$1.jsonParser((x=n[N])==null?void 0:x.result),E=v[`step_${r.step}`],S=!E,D={rotate:(B=v.rotate)!=null?B:0,valid:(w=v.valid)!=null?w:!0};c&&g!==!0?i==null||i.setImgNode(c,D):l==null||l.setValid(D.valid);const L=getStepConfig(a,r.step),{dataSourceStep:m,tool:R}=L,K=getStepConfig(a,m),$=m&&R,y=(F=(P=v[`step_${m}`])==null?void 0:P.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(E==null?void 0:E.result,l,L,y,S);if(i==null||i.launchOperation(),$&&((y==null?void 0:y.length)>0?i==null||i.setBasicInfo(K.tool,y[f]):(i==null||i.setBasicInfo(K.tool),i==null||i.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const W=(G=(q=y[f])==null?void 0:q.id)!=null?G:"",X=$?j.filter(Y=>lbAnnotation.CommonToolUtils.isSameSourceID(Y.sourceID,W)):j;l==null||l.history.initRecord(j,!0),l==null||l.setResult(X)}return __spreadProps(__spreadValues({},e),{imgIndex:N,basicIndex:f,basicResultList:y,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(V=t.payload.config)!=null?V:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:l,annotationEngine:i}=o;return __spreadProps(__spreadValues({},e),{toolInstance:l,annotationEngine:i})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(M=t.payload)==null?void 0:M.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:l}=e,i=[...l];return i[o]=__spreadValues(__spreadValues({},i[o]),n),__spreadProps(__spreadValues({},e),{imgList:i})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||n==null||n.updateRotate(),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(k=n==null?void 0:n.valid)!=null?k:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:l,step:i}=e;if(!n)return e;if(o===0||o>=l.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const a=l[o-1].result;if(!a)return e;const r=AnnotationDataUtils.copyResultChange(a,i,(H=l[o].result)!=null?H:"");l[o]=__spreadProps(__spreadValues({},l[o]),{result:r});const c=index$1.jsonParser(r)[`step_${i}`],d=(c==null?void 0:c.result)||[];return n==null||n.setResult(d),n==null||n.history.pushHistory(d),(z=n==null?void 0:n.asyncData)==null||z.call(n,l[o]),__spreadProps(__spreadValues({},e),{imgList:[...l]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:l}=t.payload;if(!o)return e;const i=getStepConfig(n,l);return o==null||o.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:l,toolInstance:o==null?void 0:o.toolInstance})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:l,imgList:i}=t.payload,{imgIndex:a,onSubmit:r}=e,N=[],c=i.map((d,g)=>{if(lbAnnotation.MathUtils.isInRange(g,l)){const f=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:d.result})});return N.push({imgIndex:g,newInfo:f}),f}return d});return r&&r([c[a]],index.ESubmitType.BatchUpdateTrackID,a,c,{updateImgList:N}),__spreadProps(__spreadValues({},e),{imgList:c})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:l}=t.payload,{imgList:i,imgIndex:a,onSubmit:r}=e,N=[],c=i.map((d,g)=>{if(lbAnnotation.MathUtils.isInRange(g,l)){const f=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:d.result})});return N.push({imgIndex:g,newInfo:f}),f}return d});return r&&r([c[a]],index.ESubmitType.BatchUpdateTrackID,a,c,{updateImgList:N}),__spreadProps(__spreadValues({},e),{imgList:c})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
|
|
@@ -11,7 +11,7 @@ interface IPointCloudContextInstances {
|
|
|
11
11
|
setBackViewInstance: (instance: PointCloudAnnotation) => void;
|
|
12
12
|
setMainViewInstance: (instance: PointCloud) => void;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
type AttrPanelLayout = '' | 'left' | 'right';
|
|
15
15
|
export interface IPointCloudContext extends IPointCloudContextInstances {
|
|
16
16
|
pointCloudBoxList: IPointCloudBoxList;
|
|
17
17
|
displayPointCloudList: IPointCloudBoxList;
|
|
@@ -4,8 +4,8 @@ import { IStepInfo } from '@/types/step';
|
|
|
4
4
|
import { OnSubmit, IFileItem, GetFileData, OnSave, OnPageChange, OnStepChange, LoadFileList } from '@/types/data';
|
|
5
5
|
import { ESubmitType } from '@/constant';
|
|
6
6
|
import { IPointCloudBox } from '@labelbee/lb-utils';
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type GraphToolInstance = RectOperation | PointOperation | PolygonOperation | LineToolOperation;
|
|
8
|
+
export type ToolInstance = GraphToolInstance | TagOperation | TextToolOperation;
|
|
9
9
|
interface CommonActions {
|
|
10
10
|
type: string;
|
|
11
11
|
payload?: any;
|
|
@@ -149,5 +149,5 @@ interface BatchUpdateResultByTrackID {
|
|
|
149
149
|
range: [number, number];
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
export
|
|
152
|
+
export type AnnotationActionTypes = UpdateToolInstance | UpdateImgList | UpdateAnnotationConfig | SubmitFileData | LoadFileData | SetTaskConfig | InitTool | UpdateOnSubmit | UpdateOnPageChange | UpdateOnStepChange | UpdateGetFileData | UpdatePageSize | UpdateGetFileList | CopyBackWordResult | UpdateOnSave | BatchUpdateTrackID | BatchUpdateResultByTrackID | InitAnnotationState;
|
|
153
153
|
export {};
|
|
@@ -19,5 +19,5 @@ interface InitImgAttribute {
|
|
|
19
19
|
type: typeof IMAGE_ATTRIBUTE_ACTIONS.INIT_IMG_ATTRIBUTE;
|
|
20
20
|
payload: {};
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type ImgAttributeActionTypes = UpdateImgAttribute | InitImgAttribute;
|
|
23
23
|
export {};
|
|
@@ -19,5 +19,5 @@ interface InitToolStyleConfig {
|
|
|
19
19
|
type: typeof TOOL_STYLE_ACTIONS.INIT_TOOL_STYLE_CONFIG;
|
|
20
20
|
payload: undefined;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type ToolStyleActionTypes = InitToolStyleConfig | UpdateToolStyleConfig;
|
|
23
23
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export type BasicTarget<T = HTMLElement> = (() => T | null) | T | null | MutableRefObject<T | null | undefined>;
|
|
3
|
+
type TargetElement = HTMLElement | Element | Document | Window;
|
|
4
4
|
export declare function getTargetElement(target?: BasicTarget<TargetElement>, defaultElement?: TargetElement): TargetElement | undefined | null;
|
|
5
5
|
/**
|
|
6
6
|
* Get class like BEM
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RenderFooter } from '@/types/main';
|
|
2
2
|
import { IStepInfo } from '@/types/step';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export
|
|
4
|
+
export type FooterTheme = 'light' | 'dark';
|
|
5
5
|
interface IProps {
|
|
6
6
|
totalPage: number;
|
|
7
7
|
imgIndex: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getClassName as
|
|
1
|
+
import{getClassName as m}from"../../utils/dom.js";import{PointCloud as L}from"@labelbee/lb-annotation";import{PointCloudUtils as N,toolStyleConverter as D,EPerspectiveView as C}from"@labelbee/lb-utils";import z from"classnames";import o,{useContext as V,useState as R,useRef as k,useEffect as v,useMemo as A}from"react";import{PointCloudContainer as F}from"./PointCloudLayout.js";import{PointCloudContext as M}from"./PointCloudContext.js";import{a2MapStateToProps as U}from"../../store/annotation/map.js";import{connect as Z}from"react-redux";import{jsonParser as q}from"../../utils/index.js";import{useSingleBox as G}from"./hooks/useSingleBox.js";import{Switch as H,Tooltip as J}from"antd";import K from"../../hooks/useSize.js";import{usePointCloudViews as Q}from"./hooks/usePointCloudViews.js";import{useTranslation as E}from"react-i18next";import{LabelBeeContext as W}from"../../store/ctx.js";var X=Object.defineProperty,Y=Object.defineProperties,$=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,I=(e,i,r)=>i in e?X(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r,b=(e,i)=>{for(var r in i||(i={}))ee.call(i,r)&&I(e,r,i[r]);if(x)for(var r of x(i))te.call(i,r)&&I(e,r,i[r]);return e},oe=(e,i)=>Y(e,$(i));const ie="LABELBEE-POINTCLOUD",P=o.createContext({isActive:!1,setTarget3DView:()=>{},reset3DView:()=>{},followTopView:()=>{}}),u=({perspectiveView:e})=>{const{isActive:i,setTarget3DView:r}=V(P),n=f=>z({[m("point-cloud-3d-view",f)]:!0,active:i});return o.createElement("span",{onClick:()=>{r(C[e])},className:n(e.toLocaleLowerCase())})},ne=()=>{const{reset3DView:e,followTopView:i}=V(P),{t:r}=E();return o.createElement("div",{className:m("point-cloud-3d-sidebar")},o.createElement(u,{perspectiveView:"Top"}),o.createElement(u,{perspectiveView:"Front"}),o.createElement(u,{perspectiveView:"Left"}),o.createElement(u,{perspectiveView:"Back"}),o.createElement(u,{perspectiveView:"Right"}),o.createElement(u,{perspectiveView:"LFT"}),o.createElement(u,{perspectiveView:"RBT"}),o.createElement(J,{title:r("CameraFollowTopView")},o.createElement("span",{onClick:()=>{i()},className:m("point-cloud-3d-view","followTop")})),o.createElement("span",{onClick:()=>{e()},className:m("point-cloud-3d-view","reset")}))},re=({currentData:e,config:i})=>{var r;const n=V(M),[f,T]=R(!0),w=k(null),{initPointCloud3d:g}=Q(),c=K(w),{t:h}=E();v(()=>{!n.mainViewInstance||g==null||g(c)},[c]);const{selectedBox:p}=G(),_=t=>{var a;const l=p==null?void 0:p.info;if(l){const s=b({},l.center);s.x=s.x-.01,s.z=10;const d=t===C.Top;(a=n.mainViewInstance)==null||a.updateCameraByBox(l,t,d?s:void 0)}},O=()=>{var t;(t=n.mainViewInstance)==null||t.resetCamera()},j=()=>{var t,a;const l=(t=n.topViewInstance)==null?void 0:t.pointCloudInstance.camera;l&&((a=n.mainViewInstance)==null||a.applyCameraTarget(l))};v(()=>{if(w.current&&(e==null?void 0:e.url)){let t=n.mainViewInstance;if(!t&&c.width){const a={left:-c.width/2,right:c.width/2,top:c.height/2,bottom:-c.height/2,near:100,far:-100};t=new L({container:w.current,isOrthographicCamera:!0,orthographicParams:a,config:i}),n.setMainViewInstance(t)}}},[c]),v(()=>{var t;if(w.current&&(e==null?void 0:e.url)&&e.result&&n.mainViewInstance){let a=n.mainViewInstance;const l=N.getBoxParamsFromResultList(e.result);l.forEach(s=>{var d;const B=(d=D.getColorFromConfig({attribute:s.attribute},oe(b({},i),{attributeConfigurable:!0}),{}))==null?void 0:d.hex;a==null||a.generateBox(s,B)}),n.setPointCloudResult(l),n.setPointCloudValid((t=q(e.result))==null?void 0:t.valid)}},[e,n.mainViewInstance]),v(()=>{var t,a,l,s;if(p){_(C.Top);const d=(l=(a=(t=n.topViewInstance)==null?void 0:t.pointCloudInstance)==null?void 0:a.camera.zoom)!=null?l:1;(s=n.mainViewInstance)==null||s.updateCameraZoom(d)}},[p]);const S=A(()=>({reset3DView:O,setTarget3DView:_,isActive:!!p,followTopView:j}),[p,n.mainViewInstance]),y=o.createElement("div",null,o.createElement("span",{style:{marginRight:8}},h("ShowArrows")),o.createElement(H,{size:"small",checked:f,onChange:t=>{var a;T(t),(a=n.mainViewInstance)==null||a.setShowDirection(t)}}));return o.createElement(F,{className:m("point-cloud-3d-container"),title:h("3DView"),toolbar:y,style:{height:e.mappingImgList&&((r=e.mappingImgList)==null?void 0:r.length)>0?"55%":"100%"}},o.createElement("div",{className:m("point-cloud-3d-content")},o.createElement(P.Provider,{value:S},o.createElement(ne,null)),o.createElement("div",{className:m("point-cloud-3d-view"),id:ie,ref:w})))};var ae=Z(U,null,null,{context:W})(re);export{ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PointCloudAnnotation as
|
|
1
|
+
import{PointCloudAnnotation as g}from"@labelbee/lb-annotation";import{getClassName as C}from"../../utils/dom.js";import{PointCloudContainer as P}from"./PointCloudLayout.js";import d,{useRef as h,useEffect as w}from"react";import{PointCloudContext as y}from"./PointCloudContext.js";import{EPerspectiveView as B}from"@labelbee/lb-utils";import{useSingleBox as v}from"./hooks/useSingleBox.js";import{SizeInfoForView as V}from"./PointCloudInfos.js";import{connect as b}from"react-redux";import{a2MapStateToProps as j}from"../../store/annotation/map.js";import{usePointCloudViews as k}from"./hooks/usePointCloudViews.js";import E from"../../hooks/useSize.js";import I from"./components/EmptyPage/index.js";import{useTranslation as S}from"react-i18next";import{LabelBeeContext as O}from"../../store/ctx.js";const D=(c,i,r=1)=>{const{width:t,height:e}=i,o={x:c.x+t*r/2,y:c.y+e*r/2},l={x:i.width/2,y:i.height/2};return{offsetX:(l.x-o.x)/r,offsetY:-(l.y-o.y)/r}},x=(c,i,r,t,e)=>{const{offsetX:o,offsetY:l}=D(c,r,i);if(e.camera.zoom=i,c){const f=Math.cos(t.rotation),p=Math.sin(t.rotation),n=o*f,u=o*p,{x:s,y:a,z:m}=e.initCameraPosition;e.camera.position.set(s+u,a-n,m+l)}e.camera.updateProjectionMatrix(),e.render()},M=({currentData:c,config:i,checkMode:r})=>{const t=d.useContext(y),e=h(null),o=E(e),{selectedBox:l}=v(),{t:f}=S(),{backViewUpdateBox:p}=k();return w(()=>{if(e.current){const n={width:e.current.clientWidth,height:e.current.clientHeight},u=new g({container:e.current,size:n,polygonOperationProps:{showDirectionLine:!1,forbidAddNew:!0},config:i,checkMode:r});t.setBackViewInstance(u)}},[]),w(()=>{if(!o||!t.backViewInstance)return;const{pointCloud2dOperation:n,pointCloudInstance:u}=t.backViewInstance;n.singleOn("renderZoom",(s,a)=>{!t.selectedPointCloudBox||x(a,s,o,t.selectedPointCloudBox,u)}),n.singleOn("dragMove",({currentPos:s,zoom:a})=>{!t.selectedPointCloudBox||x(s,a,o,t.selectedPointCloudBox,u)}),n.singleOn("updatePolygonByDrag",s=>{if(t.selectedIDs.length===1&&s.length===1){const{newPolygon:a,originPolygon:m}=s[0];a&&m&&p(a,m)}})},[t,o]),w(()=>{var n;(n=t==null?void 0:t.backViewInstance)==null||n.initSize(o)},[o]),d.createElement(P,{className:C("point-cloud-container","back-view"),title:f("BackView"),toolbar:d.createElement(V,{perspectiveView:B.Back})},d.createElement("div",{className:C("point-cloud-container","bottom-view-content")},d.createElement("div",{className:C("point-cloud-container","core-instance"),ref:e}),!l&&d.createElement(I,null)))};var N=b(j,null,null,{context:O})(M);export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MathUtils as
|
|
1
|
+
import{MathUtils as C,getCuboidFromPointCloudBox as at}from"@labelbee/lb-annotation";import{EPerspectiveView as N,PointCloudUtils as k}from"@labelbee/lb-utils";import{useContext as ct}from"react";import{PointCloudContext as ut}from"../PointCloudContext.js";import{useSingleBox as Z}from"./useSingleBox.js";import{useSelector as pt,useDispatch as gt}from"../../../store/ctx.js";import ft from"../../../utils/StepUtils.js";import{jsonParser as W}from"../../../utils/index.js";import{SetPointCloudLoading as M}from"../../../store/annotation/actionCreators.js";import{message as Pt}from"antd";import{useTranslation as Ct}from"react-i18next";import{useHistory as mt}from"./useHistory.js";import{usePolygon as ht}from"./usePolygon.js";var yt=Object.defineProperty,Lt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,G=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Q=(t,e,n)=>e in t?yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U=(t,e)=>{for(var n in e||(e={}))vt.call(e,n)&&Q(t,n,e[n]);if(G)for(var n of G(e))Bt.call(e,n)&&Q(t,n,e[n]);return t},q=(t,e)=>Lt(t,xt(e)),J=(t,e,n)=>new Promise((u,o)=>{var s=d=>{try{c(n.next(d))}catch(P){o(P)}},g=d=>{try{c(n.throw(d))}catch(P){o(P)}},c=d=>d.done?u(d.value):Promise.resolve(d.value).then(s,g);c((n=n.apply(t,e)).next())});const R=5,K=90,w={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},H=(t,e,n,u,o)=>{const[s,g,c,d]=t.pointList.map(f=>k.transferCanvas2World(f,e)),P=C.getLineCenterPoint([s,c]),m=C.getLineLength(s,g),y=C.getLineLength(g,c),A=C.getRadiusFromQuadrangle(t.pointList);let b=0,I=1,L={};if(n){const f=n.getSensesPointZAxisInPolygon([s,g,c,d]);b=(f.maxZ+f.minZ)/2,I=f.maxZ-f.minZ,L={count:f.zCount}}u&&(b=u.center.z,I=u.depth);const O={center:{x:P.x,y:P.y,z:b},width:y,height:m,depth:I,rotation:A,id:t.id},x=U(u?U(U({},u),O):q(U({},O),{attribute:"",valid:!0}),L);return o&&Object.assign(x,o),x},X=(t,e,n,u)=>{const[o,s,g]=t.pointList,[c,d,P]=e.pointList,m=C.getLineCenterPoint([o,g]),y=C.getLineCenterPoint([c,P]),b={x:{x:m.x-y.x,y:m.y-y.y}.x,y:0,z:m.y-y.y},I=C.getLineLength(o,s),L=C.getLineLength(c,d),O=I-L,x=C.getLineLength(s,g),f=C.getLineLength(d,P),D=x-f,{newBoxParams:S}=u.getNewBoxBySideUpdate(b,D,O,n);return S},wt=(t,e,n,u)=>{const[o,s,g]=t.pointList,[c,d,P]=e.pointList,m=C.getLineCenterPoint([o,g]),y=C.getLineCenterPoint([c,P]),b={x:{x:m.x-y.x,y:m.y-y.y}.x,y:0,z:m.y-y.y},I=C.getLineLength(o,s),L=C.getLineLength(c,d),O=I-L,x=C.getLineLength(s,g),f=C.getLineLength(d,P),D=x-f;let{newBoxParams:S}=u.getNewBoxByBackUpdate(b,D,O,n);return S},Y=(t,e,n,u)=>{if(!n)return;const{pointCloud2dOperation:o,pointCloudInstance:s}=n;s.loadPCDFileByBox(u,t,{width:R,depth:R});const{cameraPositionVector:g}=s.updateOrthoCamera(t,N.Left);s.setInitCameraPosition(g);const{polygon2d:c,zoom:d}=s.getBoxSidePolygon2DCoordinate(t);s.camera.zoom=d,s.camera.updateProjectionMatrix(),s.render(),o.initPosition(),o.zoomChangeOnCenter(d),o.setResultAndSelectedID([{id:e.id,valid:t.valid,pointList:c,textAttribute:"",isRect:!0,attribute:t.attribute}],e.id)},$=(t,e,n,u)=>{if(!n)return;const{pointCloud2dOperation:o,pointCloudInstance:s}=n;s.loadPCDFileByBox(u,t,{height:R,depth:R});const{cameraPositionVector:g}=s.updateOrthoCamera(t,N.Back);s.setInitCameraPosition(g);const{polygon2d:c,zoom:d}=s.getBoxBackPolygon2DCoordinate(t);s.camera.zoom=d,s.camera.updateProjectionMatrix(),s.render(),o.initPosition(),o.zoomChangeOnCenter(d),o.setResultAndSelectedID([{id:e.id,valid:t.valid,pointList:c,textAttribute:"",isRect:!0,attribute:t.attribute}],e.id)},tt=(t,e,n,u)=>{var o;if(!n||!u)return;u.generateBox(t,e.id),u.render();const{pointCloud2dOperation:s,pointCloudInstance:g}=n,{polygon2d:c}=g.getBoxTopPolygon2DCoordinate(t),d=[...s.polygonList],P=d.find(m=>m.id===e.id);P?P.pointList=c:d.push({id:e.id,pointList:c,textAttribute:"",isRect:!0,valid:(o=t.valid)!=null?o:!0}),s.setResultAndSelectedID(d,e.id)},bt=()=>{const t=ct(ut),{topViewInstance:e,sideViewInstance:n,backViewInstance:u,mainViewInstance:o,addPointCloudBox:s,setSelectedIDs:g,selectedIDs:c,pointCloudBoxList:d,hideAttributes:P}=t,{addHistory:m,initHistory:y,pushHistoryUnderUpdatePolygon:A}=mt(),{selectedPolygon:b}=ht(),{updateSelectedBox:I,updateSelectedBoxes:L,getPointCloudByID:O}=Z(),{currentData:x,config:f}=pt(i=>{const{stepList:r,step:p,imgList:l,imgIndex:a}=i.annotation;return{currentData:l[a],config:W(ft.getCurrentStepInfo(p,r).config)}}),D=gt(),{selectedBox:S}=Z(),{t:ot}=Ct(),E=S==null?void 0:S.info;if(!e||!n||!u)return{topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{},backViewUpdateBox:()=>{}};const{pointCloudInstance:et}=e,nt=i=>{o==null||o.generateBox(i),o==null||o.controls.update(),o==null||o.render()},it=({newPolygon:i,size:r,imgList:p,trackConfigurable:l,zoom:a})=>{var h;const v={attribute:(h=e.pointCloud2dOperation.defaultAttribute)!=null?h:""};l===!0&&Object.assign(v,{trackID:k.getNextTrackID({imgList:[],extraBoxList:d})});const B=H(i,r,et,void 0,v),_=e==null?void 0:e.pointCloud2dOperation,V=B;if((f==null?void 0:f.lowerLimitPointsNumInBox)&&typeof B.count=="number"&&B.count<f.lowerLimitPointsNumInBox){Pt.info(ot("LowerLimitPointsNumInBox",{num:f.lowerLimitPointsNumInBox})),_.deletePolygon(B.id);return}const z=P.includes(i.attribute),j=s(V);z?g([]):(g(V.id),_.setSelectedIDs([i.id]),T(w.Top,i,V,a,j)),m({newBoxParams:V})},st=(i,r)=>{const p=i!=null?i:S==null?void 0:S.info,l=e==null?void 0:e.pointCloud2dOperation;if(l.setSelectedIDs(c),c.length===0||!l)return;const a=l.selectedPolygon;if(c.length===1&&p){T(w.Top,a,p,void 0,r);return}},F=(i,r,p)=>{if(E){let l,a;switch(p){case w.Back:l=wt;break;case w.Side:l=X;break;default:l=X;break}if(a=l(i,r,E,n.pointCloudInstance),o){const{count:v}=o.getSensesPointZAxisInPolygon(at(a).polygonPointList,[a.center.z-a.depth/2,a.center.z+a.depth/2]);a=q(U({},a),{count:v})}const h=I(a);return T(p,i,a,void 0,h),h}},rt=(i,r)=>{F(i,r,w.Side)},lt=(i,r)=>{F(i,r,w.Back)},dt=(i,r)=>{if(b){const l=i[0].newPolygon;l.pointList=l.pointList.map(a=>k.transferCanvas2World(a,r)),A(i[0].newPolygon);return}const p=i.map(({newPolygon:l})=>{const a=O(l.id);return H(l,r,e.pointCloudInstance,a)});if(p.length===1){const{newPolygon:l}=i[0],a=L(p);T(w.Top,l,p[0],void 0,a)}else{const l=L(p);l&&t.syncAllViewPointCloudColor(l)}},T=(i,r,p,l,a)=>J(void 0,null,function*(){const h=x==null?void 0:x.url;a&&(yield t.syncAllViewPointCloudColor(a));const v={[w.Side]:()=>{Y(p,r,n,h)},[w.Back]:()=>{u&&$(p,r,u,h)},[w.Top]:()=>{tt(p,r,e,o)}};Object.keys(v).forEach(B=>{B!==i&&v[B]()}),l&&(o==null||o.updateCameraZoom(l)),nt(p)});return{topViewAddBox:it,topViewSelectedChanged:st,topViewUpdateBox:dt,sideViewUpdateBox:rt,backViewUpdateBox:lt,pointCloudBoxListUpdated:i=>{e.updatePolygonList(i),o==null||o.generateBoxes(i)},initPointCloud3d:i=>{if(!o)return;const r={left:-i.width/2,right:i.width/2,top:i.height/2,bottom:-i.height/2,near:100,far:-100};o.initOrthographicCamera(r),o.initRenderer(),o.render()},updatePointCloudData:(...i)=>J(void 0,[...i],function*(r=x){var p,l,a,h,v,B;if(!(r==null?void 0:r.url)||!o)return;M(D,!0),yield o.loadPCDFile(r.url,(p=f==null?void 0:f.radius)!=null?p:K),d.forEach(j=>{o==null||o.removeObjectByName(j.id)});let _=[],V=[];r.result?(_=k.getBoxParamsFromResultList(r.result),V=k.getPolygonListFromResultList(r.result),_.forEach(j=>{o==null||o.generateBox(j)}),t.syncAllViewPointCloudColor(_),t.setPointCloudResult(_),t.setPolygonList(V)):(t.setPointCloudResult([]),t.setPolygonList([])),y({pointCloudBoxList:_,polygonList:V}),o.updateTopCamera();const z=(a=(l=W(r.result))==null?void 0:l.valid)!=null?a:!0;t.setPointCloudValid(z),(h=t.sideViewInstance)==null||h.clearAllData(),(v=t.backViewInstance)==null||v.clearAllData(),e.updateData(r.url,r.result,{radius:(B=f==null?void 0:f.radius)!=null?B:K}),M(D,!1)})}};export{$ as synchronizeBackView,Y as synchronizeSideView,tt as synchronizeTopView,H as topViewPolygon2PointCloud,bt as usePointCloudViews};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getClassName as t}from"../../utils/dom.js";import e from"react";import r from"./PointCloud3DView.js";import a from"./PointCloudBackView.js";import m from"./PointCloudTopView.js";import u from"./PointCloudSideView.js";import
|
|
1
|
+
import{getClassName as t}from"../../utils/dom.js";import e from"react";import r from"./PointCloud3DView.js";import a from"./PointCloudBackView.js";import m from"./PointCloudTopView.js";import u from"./PointCloudSideView.js";import s from"./PointCloud2DView.js";import c from"./PointCloudListener.js";import{connect as d}from"react-redux";import{LabelBeeContext as p}from"../../store/ctx.js";import{AnnotatedAttributesPanelFixedLeft as C,AnnotatedAttributesPanelFixedRight as P}from"../../views/MainView/toolFooter/AnnotatedAttributes/index.js";const f=({imgList:n,drawLayerSlot:i,checkMode:o})=>n.length===0?null:e.createElement(e.Fragment,null,e.createElement(c,{checkMode:o}),e.createElement("div",{className:t("point-cloud-layout"),onContextMenu:l=>l.preventDefault()},e.createElement("div",{className:t("point-cloud-wrapper")},e.createElement(C,null),e.createElement("div",{className:t("point-cloud-content")},e.createElement("div",{className:t("point-cloud-container","left")},e.createElement(s,null),e.createElement(r,null)),e.createElement("div",{className:t("point-cloud-container","right")},e.createElement(m,{drawLayerSlot:i,checkMode:o}),e.createElement("div",{className:t("point-cloud-container","right-bottom")},e.createElement(u,{checkMode:o}),e.createElement(a,{checkMode:o})))),e.createElement(P,null)))),w=n=>({imgList:n.annotation.imgList});var E=d(w,null,null,{context:p})(f);export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getFormatSize as It}from"../../components/customResizeHook/index.js";import{ESubmitType as W}from"../../constant/index.js";import Tt from"../../constant/styleString.js";import{ANNOTATION_ACTIONS as r}from"../Actions.js";import{jsonParser as H}from"../../utils/index.js";import $ from"../../utils/AnnotationDataUtils.js";import{ConfigUtils as Lt}from"../../utils/ConfigUtils.js";import{composeResultWithBasicImgInfo as nt,composeResult as ot}from"../../utils/data.js";import z from"../../utils/StepUtils.js";import st from"../../utils/ToolUtils.js";import{MathUtils as lt,CommonToolUtils as Et,AnnotationEngine as St,ImgUtils as At}from"@labelbee/lb-annotation";import{PointCloudUtils as it,i18n as w}from"@labelbee/lb-utils";import{Modal as rt}from"antd";import{message as ut}from"antd/es";import vt from"lodash";import{SetAnnotationLoading as K}from"./actionCreators.js";var Dt=Object.defineProperty,yt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,ct=(t,e,l)=>e in t?Dt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l,o=(t,e)=>{for(var l in e||(e={}))Rt.call(e,l)&&ct(t,l,e[l]);if(at)for(var l of at(e))Ot.call(e,l)&&ct(t,l,e[l]);return t},u=(t,e)=>yt(t,Pt(e)),dt=(t,e,l)=>new Promise((m,p)=>{var I=f=>{try{E(l.next(f))}catch(P){p(P)}},L=f=>{try{E(l.throw(f))}catch(P){p(P)}},E=f=>f.done?m(f.value):Promise.resolve(f.value).then(I,L);E((l=l.apply(t,e)).next())});const b=(t,e)=>t.find(l=>l.step===e),pt={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1},Ct=t=>{const{imgList:e,imgPageSize:l}=t;return Math.ceil(e.length/l)},gt=(t,e)=>t.reduce((l,m)=>{if(m){const p=m.result;if(H(p)[`step_${e}`])return l+1}return l},0)/t.length,ht=(t,e)=>{const{step:l,stepList:m}=t,p=z.getCurrentStepInfo(l,m),I=Lt.jsonParser(p.config);if(st.isVideoTool(p==null?void 0:p.tool)||st.isPointCloudTool(p==null?void 0:p.tool))return;const L=document.getElementById("toolContainer");if(!L)throw"Not exist dom named id-toolContainer";const E=It({width:window.innerWidth,height:window.innerHeight}),f=new St({container:L,toolName:p.tool,size:E,imgNode:e,config:I,style:JSON.parse(Tt)});return{toolInstance:f==null?void 0:f.toolInstance,annotationEngine:f}},bt=(t,e)=>(l,m)=>dt(void 0,null,function*(){const{stepList:p,step:I}=m().annotation,L=z.currentToolIsVideo(I,p),E=z.currentToolIsPointCloud(I,p);if(K(l,!0),yield l(Nt(t)),L||E){l(Ut(t));return}l(wt(t,e))}),Nt=t=>(e,l)=>dt(void 0,null,function*(){const{getFileData:m,imgList:p}=l().annotation;if(m){const I=yield m(p[t],t);e({type:r.SET_FILE_DATA,payload:{fileData:I,index:t}})}}),Ut=t=>e=>{K(e,!1),e({type:r.LOAD_FILE_DATA,payload:{nextIndex:t}})},wt=(t,e)=>(l,m)=>{var p;const{toolInstance:I,imgList:L}=m().annotation,E=(p=L==null?void 0:L[t])==null?void 0:p.url;At.load(E).then(f=>{K(l,!1),l({type:r.LOAD_FILE_DATA,payload:{imgNode:f,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{K(l,!1),I==null||I.setErrorImg(),l({type:r.LOAD_FILE_DATA,payload:{nextIndex:t,nextBasicIndex:e}})})},xt=({toolInstance:t,imgList:e,imgIndex:l,stepList:m,step:p=1})=>{var I,L,E,f;const P=((I=e[l])==null?void 0:I.result)||"",[x,B,F]=(L=t==null?void 0:t.exportData())!=null?L:[],j=(f=(E=t==null?void 0:t.exportCustomData)==null?void 0:E.call(t))!=null?f:{},G=nt(P,B),V=ot(G,{step:p,stepList:m},{rect:x},j);return e.map((N,k)=>k===l?o(u(o({},N),{result:V}),F):o({},N))},Bt=(t=o({},pt),e)=>{var l,m,p,I,L,E,f,P,x,B,F,j,G,V,N,k,X,Y,q,J,Z,Q;switch(e.type){case r.INIT_ALL_STATE:return o(o({},t),pt);case r.UPDATE_TOOL_INSTANCE:return u(o({},t),{toolInstance:e.payload.toolInstance});case r.UPDATE_IMG_LIST:return u(o({},t),{imgList:e.payload.imgList});case r.CALC_STEP_PROGRESS:{const{imgList:n,step:s}=t,i=gt(n,s);return u(o({},t),{stepProgress:i})}case r.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:s,step:i,stepList:a,toolInstance:d,onSubmit:c,resultList:T}=t;if(!d||!n[s])return t;const g=((l=n[s])==null?void 0:l.result)||"",[,_,S]=(m=d==null?void 0:d.exportData())!=null?m:[],A=(I=(p=d==null?void 0:d.exportCustomData)==null?void 0:p.call(d))!=null?I:{},y=nt(g,_),O=ot(y,{step:i,stepList:a},{rect:T},A),v=t.imgList.map((R,D)=>{if(D===s){const U=$.dataCorrection(O,g,i,a);return o(u(o({},R),{result:U}),S)}return R});if(((L=e.payload)==null?void 0:L.submitType)===W.SyncImgList)return u(o({},t),{imgList:v});c&&c([v[s]],(E=e.payload)==null?void 0:E.submitType,s,v);const C=gt(v,i);return u(o({},t),{stepProgress:C,imgList:v})}case r.SAVE_RESULT:{const{imgList:n,imgIndex:s,onSave:i}=t;return i==null||i(n[s],s,n),o({},t)}case r.SUBMIT_RESULT:{const{imgList:n,basicIndex:s,resultList:i,toolInstance:a,basicResultList:d}=t;if(!a)return t;const[c]=(f=a==null?void 0:a.exportData())!=null?f:[];let T=c;if((d==null?void 0:d.length)>0){const g=(P=d[s])==null?void 0:P.id,_=c.map(S=>u(o({},S),{sourceID:g}));T=vt.cloneDeep(i).filter(S=>S.sourceID!==g),T.push(..._)}return u(o({},t),{resultList:T,imgList:n})}case r.SET_BASIC_INDEX:{const{toolInstance:n,step:s,imgList:i,imgIndex:a,stepList:d,annotationEngine:c,resultList:T,basicResultList:g}=t;if(!n||!c)return t;const _=e.payload.basicIndex,S=(x=g[_])==null?void 0:x.id,A=H((B=i[a])==null?void 0:B.result),y=(T||[]).filter(U=>U.sourceID===S),O=b(d,s),{dataSourceStep:v,tool:C}=O,R=b(d,v);let D=[];return v&&C&&(D=(F=A[`step_${v}`])==null?void 0:F.result,(D==null?void 0:D.length)>0?(c==null||c.setBasicInfo(R.tool,D[_]),c==null||c.launchOperation()):(c==null||c.setBasicInfo(R.tool),c==null||c.forbidOperation(),ut.info(w.t("NoDependency")))),n==null||n.setResult(y),n==null||n.history.initRecord(y,!0),u(o({},t),{basicIndex:_})}case r.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=e.payload;return u(o({},t),{triggerEventAfterIndexChanged:!!n})}case r.LOAD_FILE_DATA:{const{imgList:n,step:s,toolInstance:i,annotationEngine:a,stepList:d}=t;if(!i)return u(o({},t),{imgIndex:e.payload.nextIndex});const c=z.getCurrentStepInfo(s,d),{nextIndex:T,imgNode:g,nextBasicIndex:_,imgError:S}=e.payload,A=_!=null?_:0,y=H((j=n[T])==null?void 0:j.result),O=y[`step_${c.step}`],v=!O,C={rotate:(G=y.rotate)!=null?G:0,valid:(V=y.valid)!=null?V:!0};g&&S!==!0?a==null||a.setImgNode(g,C):i==null||i.setValid(C.valid);const R=b(d,c.step),{dataSourceStep:D,tool:U}=R,tt=b(d,D),et=D&&U,h=(k=(N=y[`step_${D}`])==null?void 0:N.result)!=null?k:[],M=$.getInitialResultList(O==null?void 0:O.result,i,R,h,v);if(a==null||a.launchOperation(),et&&((h==null?void 0:h.length)>0?a==null||a.setBasicInfo(tt.tool,h[A]):(a==null||a.setBasicInfo(tt.tool),a==null||a.forbidOperation(),ut.info(w.t("NoDependency")))),c.tool!=="check"){const _t=(Y=(X=h[A])==null?void 0:X.id)!=null?Y:"",ft=et?M.filter(mt=>Et.isSameSourceID(mt.sourceID,_t)):M;i==null||i.history.initRecord(M,!0),i==null||i.setResult(ft)}return u(o({},t),{imgIndex:T,basicIndex:A,basicResultList:h,resultList:M})}case r.UPDATE_ANNOTATION_CONFIG:return u(o({},t),{config:(q=e.payload.config)!=null?q:"{}"});case r.SET_TASK_STEP_LIST:{const{stepList:n}=e.payload;return u(o({},t),{stepList:n})}case r.SET_TASK_CONFIG:{const{stepList:n,step:s}=e.payload;return u(o({},t),{stepList:n,step:s})}case r.INIT_TOOL:{const{imgNode:n}=t,s=ht(t,n);if(s){const{toolInstance:i,annotationEngine:a}=s;return u(o({},t),{toolInstance:i,annotationEngine:a})}return o({},t)}case r.SET_TOOL:{const n=(J=e.payload)==null?void 0:J.instance;return n?u(o({},t),{toolInstance:n}):o({},t)}case r.UPDATE_ON_SUBMIT:return u(o({},t),{onSubmit:e.payload.onSubmit});case r.UPDATE_ON_SAVE:return u(o({},t),{onSave:e.payload.onSave});case r.UPDATE_ON_PAGE_CHANGE:return u(o({},t),{onPageChange:e.payload.onPageChange});case r.UPDATE_ON_STEP_CHANGE:return u(o({},t),{onStepChange:e.payload.onStepChange});case r.UPDATE_GET_FILE_DATA:return u(o({},t),{getFileData:e.payload.getFileData});case r.UPDATE_PAGE_SIZE:return u(o({},t),{pageSize:e.payload.pageSize});case r.UPDATE_LOAD_FILE_LIST:return u(o({},t),{loadFileList:e.payload.loadFileList});case r.UPDATE_BEFORE_ROTATE:return u(o({},t),{beforeRotate:e.payload.beforeRotate});case r.SKIP_BEFORE_PAGE_TURNING:return u(o({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case r.SET_FILE_DATA:{const{fileData:n,index:s}=e.payload,{imgList:i}=t,a=[...i];return a[s]=o(o({},a[s]),n),u(o({},t),{imgList:a})}case r.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:s}=t;return s&&s()===!1||n==null||n.updateRotate(),t}case r.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=t,s=(Z=n==null?void 0:n.valid)!=null?Z:!0;return rt.destroyAll(),rt.confirm({content:w.t(s?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!s)},okText:w.t("Confirm"),cancelText:w.t("Cancel")}),t}case r.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:s,imgList:i,step:a}=t;if(!n)return t;if(s===0||s>=i.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),t;const d=i[s-1].result;if(!d)return t;const c=$.copyResultChange(d,a,(Q=i[s].result)!=null?Q:"");i[s]=u(o({},i[s]),{result:c});const g=H(c)[`step_${a}`],_=(g==null?void 0:g.result)||[];return n==null||n.setResult(_),n==null||n.history.pushHistory(_),n==null||n.asyncData(i[s]),u(o({},t),{imgList:[...i]})}case r.SET_STEP:{const{stepList:n,annotationEngine:s}=t,{toStep:i}=e.payload;if(!s)return t;const a=b(n,i);return s==null||s.setToolName(a.tool,a.config),u(o({},t),{step:i,toolInstance:s==null?void 0:s.toolInstance})}case r.SET_LOADING:{const{loading:n}=e.payload;return u(o({},t),{loading:!!n})}case r.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=e.payload;return u(o({},t),{pointCloudLoading:!!n})}case r.SET_CHECK_MODE:{const{checkMode:n}=e.payload;return u(o({},t),{checkMode:!!n})}case r.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:s,rangeIndex:i,imgList:a}=e.payload,{imgIndex:d,onSubmit:c}=t,T=[],g=a.map((_,S)=>{if(lt.isInRange(S,i)){const A=u(o({},_),{result:it.batchUpdateTrackID({id:n,newID:s,result:_.result})});return T.push({imgIndex:S,newInfo:A}),A}return _});return c&&c([g[d]],W.BatchUpdateTrackID,d,g,{updateImgList:T}),u(o({},t),{imgList:g})}case r.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:s,rangeIndex:i}=e.payload,{imgList:a,imgIndex:d,onSubmit:c}=t,T=[],g=a.map((_,S)=>{if(lt.isInRange(S,i)){const A=u(o({},_),{result:it.batchUpdateResultByTrackID({id:n,newData:s,result:_.result})});return T.push({imgIndex:S,newInfo:A}),A}return _});return c&&c([g[d]],W.BatchUpdateTrackID,d,g,{updateImgList:T}),u(o({},t),{imgList:g})}default:return t}};export{bt as LoadFileAndFileData,Bt as annotationReducer,xt as composeResultByToolInstance,b as getStepConfig,Ct as getTotalPage};
|
|
1
|
+
import{getFormatSize as Tt}from"../../components/customResizeHook/index.js";import{ESubmitType as W}from"../../constant/index.js";import Lt from"../../constant/styleString.js";import{ANNOTATION_ACTIONS as r}from"../Actions.js";import{jsonParser as H}from"../../utils/index.js";import $ from"../../utils/AnnotationDataUtils.js";import{ConfigUtils as Et}from"../../utils/ConfigUtils.js";import{composeResultWithBasicImgInfo as ot,composeResult as st}from"../../utils/data.js";import z from"../../utils/StepUtils.js";import lt from"../../utils/ToolUtils.js";import{MathUtils as it,CommonToolUtils as St,AnnotationEngine as At,ImgUtils as vt}from"@labelbee/lb-annotation";import{PointCloudUtils as rt,i18n as w}from"@labelbee/lb-utils";import{Modal as ut}from"antd";import{message as at}from"antd/es";import Dt from"lodash";import{SetAnnotationLoading as K}from"./actionCreators.js";var yt=Object.defineProperty,Pt=Object.defineProperties,Rt=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,dt=(t,e,l)=>e in t?yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l,o=(t,e)=>{for(var l in e||(e={}))Ot.call(e,l)&&dt(t,l,e[l]);if(ct)for(var l of ct(e))Ct.call(e,l)&&dt(t,l,e[l]);return t},u=(t,e)=>Pt(t,Rt(e)),pt=(t,e,l)=>new Promise((m,p)=>{var I=f=>{try{E(l.next(f))}catch(P){p(P)}},L=f=>{try{E(l.throw(f))}catch(P){p(P)}},E=f=>f.done?m(f.value):Promise.resolve(f.value).then(I,L);E((l=l.apply(t,e)).next())});const b=(t,e)=>t.find(l=>l.step===e),gt={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1},ht=t=>{const{imgList:e,imgPageSize:l}=t;return Math.ceil(e.length/l)},_t=(t,e)=>t.reduce((l,m)=>{if(m){const p=m.result;if(H(p)[`step_${e}`])return l+1}return l},0)/t.length,bt=(t,e)=>{const{step:l,stepList:m}=t,p=z.getCurrentStepInfo(l,m),I=Et.jsonParser(p.config);if(lt.isVideoTool(p==null?void 0:p.tool)||lt.isPointCloudTool(p==null?void 0:p.tool))return;const L=document.getElementById("toolContainer");if(!L)throw"Not exist dom named id-toolContainer";const E=Tt({width:window.innerWidth,height:window.innerHeight}),f=new At({container:L,toolName:p.tool,size:E,imgNode:e,config:I,style:JSON.parse(Lt)});return{toolInstance:f==null?void 0:f.toolInstance,annotationEngine:f}},Nt=(t,e)=>(l,m)=>pt(void 0,null,function*(){const{stepList:p,step:I}=m().annotation,L=z.currentToolIsVideo(I,p),E=z.currentToolIsPointCloud(I,p);if(K(l,!0),yield l(Ut(t)),L||E){l(wt(t));return}l(xt(t,e))}),Ut=t=>(e,l)=>pt(void 0,null,function*(){const{getFileData:m,imgList:p}=l().annotation;if(m){const I=yield m(p[t],t);e({type:r.SET_FILE_DATA,payload:{fileData:I,index:t}})}}),wt=t=>e=>{K(e,!1),e({type:r.LOAD_FILE_DATA,payload:{nextIndex:t}})},xt=(t,e)=>(l,m)=>{var p;const{toolInstance:I,imgList:L}=m().annotation,E=(p=L==null?void 0:L[t])==null?void 0:p.url;vt.load(E).then(f=>{K(l,!1),l({type:r.LOAD_FILE_DATA,payload:{imgNode:f,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{K(l,!1),I==null||I.setErrorImg(),l({type:r.LOAD_FILE_DATA,payload:{nextIndex:t,nextBasicIndex:e}})})},Bt=({toolInstance:t,imgList:e,imgIndex:l,stepList:m,step:p=1})=>{var I,L,E,f;const P=((I=e[l])==null?void 0:I.result)||"",[x,B,F]=(L=t==null?void 0:t.exportData())!=null?L:[],j=(f=(E=t==null?void 0:t.exportCustomData)==null?void 0:E.call(t))!=null?f:{},G=ot(P,B),V=st(G,{step:p,stepList:m},{rect:x},j);return e.map((N,k)=>k===l?o(u(o({},N),{result:V}),F):o({},N))},Ft=(t=o({},gt),e)=>{var l,m,p,I,L,E,f,P,x,B,F,j,G,V,N,k,X,Y,q,J,Z,Q,tt;switch(e.type){case r.INIT_ALL_STATE:return o(o({},t),gt);case r.UPDATE_TOOL_INSTANCE:return u(o({},t),{toolInstance:e.payload.toolInstance});case r.UPDATE_IMG_LIST:return u(o({},t),{imgList:e.payload.imgList});case r.CALC_STEP_PROGRESS:{const{imgList:n,step:s}=t,i=_t(n,s);return u(o({},t),{stepProgress:i})}case r.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:s,step:i,stepList:a,toolInstance:d,onSubmit:c,resultList:T}=t;if(!d||!n[s])return t;const g=((l=n[s])==null?void 0:l.result)||"",[,_,S]=(m=d==null?void 0:d.exportData())!=null?m:[],A=(I=(p=d==null?void 0:d.exportCustomData)==null?void 0:p.call(d))!=null?I:{},y=ot(g,_),O=st(y,{step:i,stepList:a},{rect:T},A),v=t.imgList.map((R,D)=>{if(D===s){const U=$.dataCorrection(O,g,i,a);return o(u(o({},R),{result:U}),S)}return R});if(((L=e.payload)==null?void 0:L.submitType)===W.SyncImgList)return u(o({},t),{imgList:v});c&&c([v[s]],(E=e.payload)==null?void 0:E.submitType,s,v);const C=_t(v,i);return u(o({},t),{stepProgress:C,imgList:v})}case r.SAVE_RESULT:{const{imgList:n,imgIndex:s,onSave:i}=t;return i==null||i(n[s],s,n),o({},t)}case r.SUBMIT_RESULT:{const{imgList:n,basicIndex:s,resultList:i,toolInstance:a,basicResultList:d}=t;if(!a)return t;const[c]=(f=a==null?void 0:a.exportData())!=null?f:[];let T=c;if((d==null?void 0:d.length)>0){const g=(P=d[s])==null?void 0:P.id,_=c.map(S=>u(o({},S),{sourceID:g}));T=Dt.cloneDeep(i).filter(S=>S.sourceID!==g),T.push(..._)}return u(o({},t),{resultList:T,imgList:n})}case r.SET_BASIC_INDEX:{const{toolInstance:n,step:s,imgList:i,imgIndex:a,stepList:d,annotationEngine:c,resultList:T,basicResultList:g}=t;if(!n||!c)return t;const _=e.payload.basicIndex,S=(x=g[_])==null?void 0:x.id,A=H((B=i[a])==null?void 0:B.result),y=(T||[]).filter(U=>U.sourceID===S),O=b(d,s),{dataSourceStep:v,tool:C}=O,R=b(d,v);let D=[];return v&&C&&(D=(F=A[`step_${v}`])==null?void 0:F.result,(D==null?void 0:D.length)>0?(c==null||c.setBasicInfo(R.tool,D[_]),c==null||c.launchOperation()):(c==null||c.setBasicInfo(R.tool),c==null||c.forbidOperation(),at.info(w.t("NoDependency")))),n==null||n.setResult(y),n==null||n.history.initRecord(y,!0),u(o({},t),{basicIndex:_})}case r.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=e.payload;return u(o({},t),{triggerEventAfterIndexChanged:!!n})}case r.LOAD_FILE_DATA:{const{imgList:n,step:s,toolInstance:i,annotationEngine:a,stepList:d}=t;if(!i)return u(o({},t),{imgIndex:e.payload.nextIndex});const c=z.getCurrentStepInfo(s,d),{nextIndex:T,imgNode:g,nextBasicIndex:_,imgError:S}=e.payload,A=_!=null?_:0,y=H((j=n[T])==null?void 0:j.result),O=y[`step_${c.step}`],v=!O,C={rotate:(G=y.rotate)!=null?G:0,valid:(V=y.valid)!=null?V:!0};g&&S!==!0?a==null||a.setImgNode(g,C):i==null||i.setValid(C.valid);const R=b(d,c.step),{dataSourceStep:D,tool:U}=R,et=b(d,D),nt=D&&U,h=(k=(N=y[`step_${D}`])==null?void 0:N.result)!=null?k:[],M=$.getInitialResultList(O==null?void 0:O.result,i,R,h,v);if(a==null||a.launchOperation(),nt&&((h==null?void 0:h.length)>0?a==null||a.setBasicInfo(et.tool,h[A]):(a==null||a.setBasicInfo(et.tool),a==null||a.forbidOperation(),at.info(w.t("NoDependency")))),c.tool!=="check"){const ft=(Y=(X=h[A])==null?void 0:X.id)!=null?Y:"",mt=nt?M.filter(It=>St.isSameSourceID(It.sourceID,ft)):M;i==null||i.history.initRecord(M,!0),i==null||i.setResult(mt)}return u(o({},t),{imgIndex:T,basicIndex:A,basicResultList:h,resultList:M})}case r.UPDATE_ANNOTATION_CONFIG:return u(o({},t),{config:(q=e.payload.config)!=null?q:"{}"});case r.SET_TASK_STEP_LIST:{const{stepList:n}=e.payload;return u(o({},t),{stepList:n})}case r.SET_TASK_CONFIG:{const{stepList:n,step:s}=e.payload;return u(o({},t),{stepList:n,step:s})}case r.INIT_TOOL:{const{imgNode:n}=t,s=bt(t,n);if(s){const{toolInstance:i,annotationEngine:a}=s;return u(o({},t),{toolInstance:i,annotationEngine:a})}return o({},t)}case r.SET_TOOL:{const n=(J=e.payload)==null?void 0:J.instance;return n?u(o({},t),{toolInstance:n}):o({},t)}case r.UPDATE_ON_SUBMIT:return u(o({},t),{onSubmit:e.payload.onSubmit});case r.UPDATE_ON_SAVE:return u(o({},t),{onSave:e.payload.onSave});case r.UPDATE_ON_PAGE_CHANGE:return u(o({},t),{onPageChange:e.payload.onPageChange});case r.UPDATE_ON_STEP_CHANGE:return u(o({},t),{onStepChange:e.payload.onStepChange});case r.UPDATE_GET_FILE_DATA:return u(o({},t),{getFileData:e.payload.getFileData});case r.UPDATE_PAGE_SIZE:return u(o({},t),{pageSize:e.payload.pageSize});case r.UPDATE_LOAD_FILE_LIST:return u(o({},t),{loadFileList:e.payload.loadFileList});case r.UPDATE_BEFORE_ROTATE:return u(o({},t),{beforeRotate:e.payload.beforeRotate});case r.SKIP_BEFORE_PAGE_TURNING:return u(o({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case r.SET_FILE_DATA:{const{fileData:n,index:s}=e.payload,{imgList:i}=t,a=[...i];return a[s]=o(o({},a[s]),n),u(o({},t),{imgList:a})}case r.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:s}=t;return s&&s()===!1||n==null||n.updateRotate(),t}case r.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=t,s=(Z=n==null?void 0:n.valid)!=null?Z:!0;return ut.destroyAll(),ut.confirm({content:w.t(s?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!s)},okText:w.t("Confirm"),cancelText:w.t("Cancel")}),t}case r.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:s,imgList:i,step:a}=t;if(!n)return t;if(s===0||s>=i.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),t;const d=i[s-1].result;if(!d)return t;const c=$.copyResultChange(d,a,(Q=i[s].result)!=null?Q:"");i[s]=u(o({},i[s]),{result:c});const g=H(c)[`step_${a}`],_=(g==null?void 0:g.result)||[];return n==null||n.setResult(_),n==null||n.history.pushHistory(_),(tt=n==null?void 0:n.asyncData)==null||tt.call(n,i[s]),u(o({},t),{imgList:[...i]})}case r.SET_STEP:{const{stepList:n,annotationEngine:s}=t,{toStep:i}=e.payload;if(!s)return t;const a=b(n,i);return s==null||s.setToolName(a.tool,a.config),u(o({},t),{step:i,toolInstance:s==null?void 0:s.toolInstance})}case r.SET_LOADING:{const{loading:n}=e.payload;return u(o({},t),{loading:!!n})}case r.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=e.payload;return u(o({},t),{pointCloudLoading:!!n})}case r.SET_CHECK_MODE:{const{checkMode:n}=e.payload;return u(o({},t),{checkMode:!!n})}case r.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:s,rangeIndex:i,imgList:a}=e.payload,{imgIndex:d,onSubmit:c}=t,T=[],g=a.map((_,S)=>{if(it.isInRange(S,i)){const A=u(o({},_),{result:rt.batchUpdateTrackID({id:n,newID:s,result:_.result})});return T.push({imgIndex:S,newInfo:A}),A}return _});return c&&c([g[d]],W.BatchUpdateTrackID,d,g,{updateImgList:T}),u(o({},t),{imgList:g})}case r.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:s,rangeIndex:i}=e.payload,{imgList:a,imgIndex:d,onSubmit:c}=t,T=[],g=a.map((_,S)=>{if(it.isInRange(S,i)){const A=u(o({},_),{result:rt.batchUpdateResultByTrackID({id:n,newData:s,result:_.result})});return T.push({imgIndex:S,newInfo:A}),A}return _});return c&&c([g[d]],W.BatchUpdateTrackID,d,g,{updateImgList:T}),u(o({},t),{imgList:g})}default:return t}};export{Nt as LoadFileAndFileData,Ft as annotationReducer,Bt as composeResultByToolInstance,b as getStepConfig,ht as getTotalPage};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@labelbee/lb-components",
|
|
3
|
-
"version": "1.9.0-alpha.
|
|
3
|
+
"version": "1.9.0-alpha.7",
|
|
4
4
|
"description": "Provide a complete library of annotation components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"es": "./es/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@ant-design/icons": "^4.6.2",
|
|
44
|
-
"@labelbee/lb-annotation": "^1.13.0-alpha.
|
|
44
|
+
"@labelbee/lb-annotation": "^1.13.0-alpha.6",
|
|
45
45
|
"@labelbee/lb-utils": "^1.6.0-alpha.5",
|
|
46
46
|
"ahooks": "^3.4.0",
|
|
47
47
|
"classnames": "^2.3.0",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"path": "node_modules/cz-conventional-changelog"
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "5fa52aaa658d7268a62fc0ba4ca7304c8a57958d"
|
|
101
101
|
}
|
package/es/App.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sources":["../src/App.tsx"],"sourcesContent":["import MainView from '@/views/MainView';\nimport { i18n } from '@labelbee/lb-utils';\nimport React, { useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { store } from '.';\nimport { LabelBeeContext } from '@/store/ctx';\nimport { AppState } from './store';\nimport { ANNOTATION_ACTIONS } from './store/Actions';\nimport {\n InitAnnotationState,\n InitTaskData,\n loadImgList,\n UpdateInjectFunc,\n} from './store/annotation/actionCreators';\nimport { LoadFileAndFileData } from './store/annotation/reducer';\nimport { ToolInstance } from './store/annotation/types';\nimport {\n GetFileData,\n IFileItem,\n LoadFileList,\n OnPageChange,\n OnSave,\n OnStepChange,\n OnSubmit,\n} from './types/data';\nimport { Header, RenderFooter, Sider } from './types/main';\nimport { IStepInfo } from './types/step';\nimport { ConfigProvider } from 'antd/es';\nimport zhCN from 'antd/es/locale/zh_CN';\nimport enUS from 'antd/es/locale/en_US';\n\ninterface IAnnotationStyle {\n strokeColor: string;\n fillColor: string;\n textColor: string;\n toolColor: any;\n}\n\nexport interface AppProps {\n exportData?: (data: any[]) => void;\n goBack?: () => void;\n imgList?: IFileItem[];\n config: string;\n stepList: IStepInfo[];\n step: number;\n onSubmit?: OnSubmit;\n onSave?: OnSave;\n onPageChange?: OnPageChange;\n onStepChange?: OnStepChange;\n getFileData?: GetFileData;\n pageSize: number;\n loadFileList?: LoadFileList;\n headerName?: string;\n initialIndex?: number;\n className?: string;\n toolInstance: ToolInstance;\n header?: Header;\n footer?: RenderFooter;\n sider?: Sider;\n style?: {\n layout?: { [key: string]: any };\n header?: { [key: string]: any };\n sider?: { [key: string]: any };\n footer?: { [key: string]: any };\n };\n setToolInstance?: (tool: ToolInstance) => void;\n mode?: 'light' | 'dark'; // 临时需求应用于 toolFooter 的操作\n showTips?: boolean; // 是否展示 tips\n tips?: string; // Tips 具体内容\n defaultLang: 'en' | 'cn'; // 国际化设置\n leftSider?: () => React.ReactNode | React.ReactNode;\n\n // data Correction\n skipBeforePageTurning?: (pageTurning: Function) => void;\n beforeRotate?: () => boolean;\n\n drawLayerSlot?: (props: {\n zoom: number;\n currentPos: { x: number; y: number };\n }) => React.ReactNode;\n\n // 标注信息扩展的功能\n dataInjectionAtCreation: (annotationData: any) => {};\n // 渲染增强\n renderEnhance: {\n staticRender?: (canvas: HTMLCanvasElement, data: any, style: IAnnotationStyle) => void;\n selectedRender?: (canvas: HTMLCanvasElement, data: any, style: IAnnotationStyle) => void;\n creatingRender?: (canvas: HTMLCanvasElement, data: any, style: IAnnotationStyle) => void;\n };\n customRenderStyle?: (data: any) => IAnnotationStyle;\n\n checkMode?: boolean;\n}\n\nconst App: React.FC<AppProps> = (props) => {\n const [_, forceRender] = useState(0);\n const {\n imgList,\n step = 1,\n stepList,\n onSubmit,\n onSave,\n onPageChange,\n onStepChange,\n initialIndex = 0,\n toolInstance,\n setToolInstance,\n getFileData,\n pageSize = 10,\n loadFileList,\n defaultLang = 'cn',\n skipBeforePageTurning,\n beforeRotate,\n checkMode = false\n } = props;\n\n useEffect(() => {\n store.dispatch(\n InitTaskData({\n onSubmit,\n stepList,\n step,\n getFileData,\n pageSize,\n loadFileList,\n onSave,\n onPageChange,\n onStepChange,\n skipBeforePageTurning,\n beforeRotate,\n checkMode\n }),\n );\n\n initImgList();\n // 初始化国际化语言\n i18n.changeLanguage(defaultLang);\n\n const i18nLanguageChangedFunc = () => {\n forceRender((v) => v + 1);\n };\n\n i18n.on('languageChanged', i18nLanguageChangedFunc);\n return () => {\n i18n.off('languageChanged', i18nLanguageChangedFunc);\n\n // Init all annotation state after unmounting\n InitAnnotationState(store.dispatch);\n };\n }, []);\n\n useEffect(() => {\n store.dispatch(\n UpdateInjectFunc({\n onSubmit,\n stepList,\n getFileData,\n pageSize,\n loadFileList,\n onSave,\n onPageChange,\n onStepChange,\n beforeRotate,\n }),\n );\n\n i18n.changeLanguage(defaultLang);\n }, [\n onSubmit,\n stepList,\n getFileData,\n pageSize,\n loadFileList,\n onSave,\n onPageChange,\n onStepChange,\n defaultLang,\n beforeRotate,\n ]);\n\n useEffect(() => {\n setToolInstance?.(toolInstance);\n }, [toolInstance]);\n\n // 初始化imgList 优先以loadFileList方式加载数据\n const initImgList = () => {\n if (loadFileList) {\n loadImgList(store.dispatch, store.getState, initialIndex, true).then((isSuccess) => {\n if (isSuccess) {\n store.dispatch(LoadFileAndFileData(initialIndex));\n }\n });\n } else if (imgList && imgList.length > 0) {\n store.dispatch({\n type: ANNOTATION_ACTIONS.UPDATE_IMG_LIST,\n payload: {\n imgList,\n },\n });\n store.dispatch(LoadFileAndFileData(initialIndex));\n }\n };\n\n return (\n <div>\n <ConfigProvider locale={i18n.language === 'en' ? enUS : zhCN}>\n <MainView {...props} />\n </ConfigProvider>\n </div>\n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n toolInstance: state.annotation.toolInstance,\n});\n\nexport default connect(mapStateToProps, null, null, { context: LabelBeeContext })(App);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FA,MAAM,GAAA,GAA0B,CAAC,KAAU,KAAA;AACzC,EAAM,MAAA,CAAC,CAAG,EAAA,WAAA,CAAA,GAAe,QAAS,CAAA,CAAA,CAAA,CAAA;AAClC,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,IAAO,GAAA,CAAA;AAAA,IACP,QAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAe,GAAA,CAAA;AAAA,IACf,YAAA;AAAA,IACA,eAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAW,GAAA,EAAA;AAAA,IACX,YAAA;AAAA,IACA,WAAc,GAAA,IAAA;AAAA,IACd,qBAAA;AAAA,IACA,YAAA;AAAA,IACA,SAAY,GAAA,KAAA;AAAA,GACV,GAAA,KAAA,CAAA;AAEJ,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,KAAA,CAAM,SACJ,YAAa,CAAA;AAAA,MACX,QAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,qBAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA;AAAA,KAAA,CAAA,CAAA,CAAA;AAIJ,IAAA,WAAA,EAAA,CAAA;AAEA,IAAA,IAAA,CAAK,cAAe,CAAA,WAAA,CAAA,CAAA;AAEpB,IAAA,MAAM,0BAA0B,MAAM;AACpC,MAAY,WAAA,CAAA,CAAC,MAAM,CAAI,GAAA,CAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAGzB,IAAA,IAAA,CAAK,GAAG,iBAAmB,EAAA,uBAAA,CAAA,CAAA;AAC3B,IAAA,OAAO,MAAM;AACX,MAAA,IAAA,CAAK,IAAI,iBAAmB,EAAA,uBAAA,CAAA,CAAA;AAG5B,MAAA,mBAAA,CAAoB,KAAM,CAAA,QAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAE3B,EAAA,EAAA,CAAA,CAAA;AAEH,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,KAAA,CAAM,SACJ,gBAAiB,CAAA;AAAA,MACf,QAAA;AAAA,MACA,QAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,KAAA,CAAA,CAAA,CAAA;AAIJ,IAAA,IAAA,CAAK,cAAe,CAAA,WAAA,CAAA,CAAA;AAAA,GACnB,EAAA;AAAA,IACD,QAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,YAAA;AAAA,IACA,MAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAA;AAAA,IACA,WAAA;AAAA,IACA,YAAA;AAAA,GAAA,CAAA,CAAA;AAGF,EAAA,SAAA,CAAU,MAAM;AACd,IAAkB,eAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,eAAA,CAAA,YAAA,CAAA,CAAA;AAAA,GAAA,EACjB,CAAC,YAAA,CAAA,CAAA,CAAA;AAGJ,EAAA,MAAM,cAAc,MAAM;AACxB,IAAA,IAAI,YAAc,EAAA;AAChB,MAAY,WAAA,CAAA,KAAA,CAAM,UAAU,KAAM,CAAA,QAAA,EAAU,cAAc,IAAM,CAAA,CAAA,IAAA,CAAK,CAAC,SAAc,KAAA;AAClF,QAAA,IAAI,SAAW,EAAA;AACb,UAAA,KAAA,CAAM,SAAS,mBAAoB,CAAA,YAAA,CAAA,CAAA,CAAA;AAAA,SAAA;AAAA,OAAA,CAAA,CAAA;AAAA,KAG9B,MAAA,IAAA,OAAA,IAAW,OAAQ,CAAA,MAAA,GAAS,CAAG,EAAA;AACxC,MAAA,KAAA,CAAM,QAAS,CAAA;AAAA,QACb,MAAM,kBAAmB,CAAA,eAAA;AAAA,QACzB,OAAS,EAAA;AAAA,UACP,OAAA;AAAA,SAAA;AAAA,OAAA,CAAA,CAAA;AAGJ,MAAA,KAAA,CAAM,SAAS,mBAAoB,CAAA,YAAA,CAAA,CAAA,CAAA;AAAA,KAAA;AAAA,GAAA,CAAA;AAIvC,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAD,IACE,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAD,EAAA;AAAA,IAAgB,MAAQ,EAAA,IAAA,CAAK,QAAa,KAAA,IAAA,GAAO,IAAO,GAAA,IAAA;AAAA,GACtD,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAD,cAAc,CAAA,EAAA,EAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA;AAMtB,MAAM,eAAA,GAAkB,CAAC,KAAqB,MAAA;AAAA,EAC5C,YAAA,EAAc,MAAM,UAAW,CAAA,YAAA;AAAA,CAAA,CAAA,CAAA;AAGjC,YAAe,QAAQ,eAAiB,EAAA,IAAA,EAAM,IAAM,EAAA,CAAE,SAAS,eAAmB,CAAA,CAAA,CAAA,GAAA,CAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon_adapt.svg.js","sources":["../../../../src/assets/annotation/common/icon_adapt.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b fill: white%3b %7d %3c/style%3e %3c/defs%3e %3cg id='icon_adapt' transform='translate(-1021.825 -996)'%3e %3crect id='%e7%9f%a9%e5%bd%a2_200' data-name='%e7%9f%a9%e5%bd%a2 200' class='cls-1' width='16' height='16' transform='translate(1021.825 996)'/%3e %3crect id='%e7%9f%a9%e5%bd%a2_191' data-name='%e7%9f%a9%e5%bd%a2 191' class='cls-2' width='8' height='7' transform='translate(1025.825 1000.167)'/%3e %3cpath id='%e8%81%94%e5%90%88_5' data-name='%e8%81%94%e5%90%88 5' class='cls-2' d='M3%2c4V1H0V0H4V4Z' transform='translate(1033.825 997)'/%3e %3cpath id='%e8%81%94%e5%90%88_7' data-name='%e8%81%94%e5%90%88 7' class='cls-2' d='M0%2c4V3H3V0H4V4Z' transform='translate(1025.825 1001.001) rotate(180)'/%3e %3cpath id='%e8%81%94%e5%90%88_8' data-name='%e8%81%94%e5%90%88 8' class='cls-2' d='M3%2c4V1H0V0H4V4Z' transform='translate(1025.825 1010.335) rotate(180)'/%3e %3cpath id='%e8%81%94%e5%90%88_6' data-name='%e8%81%94%e5%90%88 6' class='cls-2' d='M0%2c4V0H4V1H1V4Z' transform='translate(1037.824 1010.335) rotate(180)'/%3e %3c/g%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon_adapt_black.svg.js","sources":["../../../../src/assets/annotation/common/icon_adapt_black.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 4.16699H4V11.167H12V4.16699Z' fill='%23707070'/%3e%3cpath d='M15 5V2H12V1H16V5H15Z' fill='%23707070'/%3e%3cpath d='M4 1.00098V2.00098L1 2.00098L1 5.00098L0 5.00098L0 1.00098L4 1.00098Z' fill='%23707070'/%3e%3cpath d='M1 10.335L1 13.335H4V14.335H0L0 10.335H1Z' fill='%23707070'/%3e%3cpath d='M16 10.335V14.335H12V13.335H15V10.335H16Z' fill='%23707070'/%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon_back.svg.js","sources":["../../../../src/assets/annotation/common/icon_back.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg id='icon_back' xmlns='http://www.w3.org/2000/svg' width='22' height='22.017' viewBox='0 0 22 22.017'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b opacity: 0%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3crect id='%e7%9f%a9%e5%bd%a2' class='cls-1' width='22' height='22' transform='translate(0 0)'/%3e %3cpath id='%e8%b7%af%e5%be%84' class='cls-2' d='M16.88%2c4.954C12.184%2c9.894%2c6.621%2c10.576.4%2c6.96A.794.794%2c0%2c0%2c1%2c.386%2c5.59a.765.765%2c0%2c0%2c1%2c.781%2c0C6.8%2c8.868%2c11.612%2c8.272%2c15.827%2c3.788L12.406%2c0l7.109.016.018%2c7.875Z' transform='translate(15.814 22.017) rotate(-138)'/%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon_backA.svg.js","sources":["../../../../src/assets/annotation/common/icon_backA.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg id='icon_backA' xmlns='http://www.w3.org/2000/svg' width='22' height='22.017' viewBox='0 0 22 22.017'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b opacity: 0%3b %7d .cls-2 %7b fill: %23666fff%3b %7d %3c/style%3e %3c/defs%3e %3crect id='%e7%9f%a9%e5%bd%a2' class='cls-1' width='22' height='22' transform='translate(0 0)'/%3e %3cpath id='%e8%b7%af%e5%be%84' class='cls-2' d='M16.88%2c4.954C12.184%2c9.894%2c6.621%2c10.576.4%2c6.96A.794.794%2c0%2c0%2c1%2c.386%2c5.59a.765.765%2c0%2c0%2c1%2c.781%2c0C6.8%2c8.868%2c11.612%2c8.272%2c15.827%2c3.788L12.406%2c0l7.109.016.018%2c7.875Z' transform='translate(15.814 22.017) rotate(-138)'/%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon_clear.svg.js","sources":["../../../../src/assets/annotation/common/icon_clear.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg width='24px' height='25px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3c!-- Generator: Sketch 57 (83077) - https://sketch.com --%3e %3ctitle%3e%e5%bd%a2%e7%8a%b6%3c/title%3e %3cdesc%3eCreated with Sketch.%3c/desc%3e %3cg id='%e9%a1%b5%e9%9d%a21' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e %3cg id='0_Slices' transform='translate(-46.000000%2c -141.000000)' fill-rule='nonzero'%3e %3cg id='%e6%b8%85%e7%a9%ba%e6%a0%87%e6%b3%a8' transform='translate(18.000000%2c 123.000000)'%3e %3cg id='icon_clear_normal' transform='translate(28.000000%2c 18.000000)'%3e %3crect id='icon_clear' fill='black' opacity='0' x='0' y='0.00780487805' width='24' height='24'%3e%3c/rect%3e %3cpath d='M24%2c10.6934683 C24%2c9.29483367 22.8777821%2c8.15502957 21.4955096%2c8.15502957 L15.5587661%2c8.15502957 L15.5587661%2c3.13276778 C15.5587661%2c1.40881408 14.1764936%2c0.00780487805 12.4755955%2c0.00780487805 L11.6485748%2c0.00780487805 C9.94767669%2c0.00780487805 8.56540414%2c1.40881408 8.56540414%2c3.13276778 L8.56540414%2c8.15502957 L2.5021476%2c8.15502957 C1.12221788%2c8.15502957 0%2c9.29245908 0%2c10.6934683 C0%2c11.835647 0.754392815%2c12.7926075 1.78055447%2c13.1108028 L1.78055447%2c21.9680305 C1.78055447%2c23.093587 2.68254588%2c24.0078049 3.79304959%2c24.0078049 L20.3615775%2c24.0078049 C21.4720812%2c24.0078049 22.3740726%2c23.093587 22.3740726%2c21.9680305 L22.3740726%2c13.0609364 C23.3205779%2c12.6999984 24%2c11.7786568 24%2c10.6934683 Z M10.114018%2c3.13276778 C10.114018%2c2.27554011 10.8028114%2c1.5774101 11.6485748%2c1.5774101 L12.4755955%2c1.5774101 C13.3213588%2c1.5774101 14.0101523%2c2.27554011 14.0101523%2c3.13276778 L14.0101523%2c8.15502957 L10.114018%2c8.15502957 L10.114018%2c3.13276778 Z M20.3615775%2c22.4381997 L17.8055447%2c22.4381997 L17.8055447%2c19.2206277 C17.8055447%2c18.7860774 17.4588052%2c18.4370124 17.0324092%2c18.4370124 C16.6060133%2c18.4370124 16.2592737%2c18.788452 16.2592737%2c19.2206277 L16.2592737%2c22.4381997 L12.8527919%2c22.4381997 L12.8527919%2c19.2206277 C12.8527919%2c18.7860774 12.5060523%2c18.4370124 12.0796564%2c18.4370124 C11.6509176%2c18.4370124 11.3065209%2c18.788452 11.3065209%2c19.2206277 L11.3065209%2c22.4381997 L7.89769621%2c22.4381997 L7.89769621%2c19.2206277 C7.89769621%2c18.7860774 7.55095666%2c18.4370124 7.12456072%2c18.4370124 C6.69582194%2c18.4370124 6.35142522%2c18.788452 6.35142522%2c19.2206277 L6.35142522%2c22.4381997 L3.79304959%2c22.4381997 C3.53768059%2c22.4381997 3.32916829%2c22.226861 3.32916829%2c21.9680305 L3.32916829%2c13.2295324 L20.8254588%2c13.2295324 L20.8254588%2c21.9656559 C20.8254588%2c22.226861 20.6169465%2c22.4381997 20.3615775%2c22.4381997 Z M21.4978524%2c11.6599272 L2.5021476%2c11.6599272 C1.97500976%2c11.6599272 1.54861382%2c11.2253769 1.54861382%2c10.6934683 C1.54861382%2c10.1591851 1.9773526%2c9.7246348 2.5021476%2c9.7246348 L21.4955096%2c9.7246348 C22.0226474%2c9.7246348 22.4513862%2c10.1591851 22.4513862%2c10.6934683 C22.4513862%2c11.2277514 22.0226474%2c11.6599272 21.4978524%2c11.6599272 Z' id='%e5%bd%a2%e7%8a%b6' fill='%23666666'%3e%3c/path%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon_clearSmall.svg.js","sources":["../../../../src/assets/annotation/common/icon_clearSmall.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12.004' height='11.999' viewBox='0 0 12.004 11.999'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: %23999%3b %7d %3c/style%3e %3c/defs%3e %3cpath id='icon_clearSmall' class='cls-1' d='M17526.469-1204.464l-.678-.678%2c1.752-1.751a.489.489%2c0%2c0%2c0-.006-.691.482.482%2c0%2c0%2c0-.689%2c0l-1.752%2c1.751-1.039-1.043%2c1.752-1.751a.484.484%2c0%2c0%2c0%2c0-.691.489.489%2c0%2c0%2c0-.7%2c0l-1.752%2c1.751-1.037-1.038%2c1.75-1.756a.484.484%2c0%2c0%2c0%2c0-.691.482.482%2c0%2c0%2c0-.689%2c0l-1.752%2c1.751-.682-.678a1%2c1%2c0%2c0%2c1%2c0-1.417l3.1-3.1a.972.972%2c0%2c0%2c1%2c0-1.384.981.981%2c0%2c0%2c1%2c1.387%2c0l2.422%2c2.422%2c1.736-1.732a1.47%2c1.47%2c0%2c0%2c1%2c2.076%2c0%2c1.476%2c1.476%2c0%2c0%2c1%2c0%2c2.081l-1.73%2c1.731%2c2.426%2c2.427a.98.98%2c0%2c0%2c1%2c0%2c1.386.985.985%2c0%2c0%2c1-1.391%2c0l-3.1%2c3.1a.989.989%2c0%2c0%2c1-.707.294A.987.987%2c0%2c0%2c1%2c17526.469-1204.464Z' transform='translate(-17520.656 1216.17)'/%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
|