@labelbee/lb-components 1.6.0-alpha.0 → 1.6.0-alpha.3
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/App.js +1 -1
- package/dist/assets/annotation/lineTool/icon_line.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/copy.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/nextBox.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/patse.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/prevBox.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/selectAll.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -0
- package/dist/assets/annotation/pointTool/icon_point.svg.js +1 -0
- package/dist/assets/annotation/polygonTool/icon_polygon.svg.js +1 -0
- package/dist/assets/annotation/rectTool/icon_rect.svg.js +1 -0
- package/dist/assets/annotation/rectTool/{icon_rectPattern.svg.js → icon_rect_a.svg.js} +0 -0
- package/dist/assets/{cssIcon/annotation/icon_clearSmall.svg → icons/25541b4d.svg} +0 -0
- package/dist/assets/icons/25ef334b.svg +8 -0
- package/dist/assets/icons/7eadb9c4.svg +5 -0
- package/dist/assets/icons/9d70807.svg +5 -0
- package/dist/assets/icons/c5b4262e.png +0 -0
- package/dist/assets/{cssIcon/slide_btn.svg → icons/cc550fff.svg} +0 -0
- package/dist/assets/{cssIcon/annotation/icon_clearSmall_a.svg → icons/dc9b6bfc.svg} +0 -0
- package/dist/assets/icons/e4f0b7fe.png +0 -0
- package/dist/components/AnnotationView/index.js +1 -1
- package/dist/components/AnnotationView/pointCloudAnnotationView.js +1 -0
- package/dist/components/customResizeHook/index.js +1 -1
- package/dist/components/pointCloudView/PointCloud2DView.js +1 -0
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -0
- package/dist/components/pointCloudView/PointCloudBackView.js +1 -0
- package/dist/components/pointCloudView/PointCloudContext.js +1 -0
- package/dist/components/pointCloudView/PointCloudInfos.js +1 -0
- package/dist/components/pointCloudView/PointCloudLayout.js +1 -0
- package/dist/components/pointCloudView/PointCloudListener.js +1 -0
- package/dist/components/pointCloudView/PointCloudSideView.js +1 -0
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -0
- package/dist/components/pointCloudView/hooks/useBoxes.js +1 -0
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -0
- package/dist/components/pointCloudView/hooks/usePolygon.js +1 -0
- package/dist/components/pointCloudView/hooks/useRotate.js +1 -0
- package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -0
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -0
- package/dist/components/pointCloudView/index.js +1 -0
- package/dist/hooks/annotation.js +1 -0
- package/dist/hooks/useSize.js +1 -1
- package/dist/index.css +287 -43
- package/dist/index.js +1 -1
- package/dist/store/Actions.js +1 -1
- package/dist/store/annotation/actionCreators.js +1 -1
- package/dist/store/annotation/map.js +1 -0
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/types/App.d.ts +3 -2
- package/dist/types/components/AnnotationView/index.d.ts +5 -5
- package/dist/types/components/AnnotationView/pointCloudAnnotationView.d.ts +10 -0
- package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +6 -0
- package/dist/types/components/pointCloudView/PointCloud3DView.d.ts +6 -0
- package/dist/types/components/pointCloudView/PointCloudBackView.d.ts +3 -0
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +31 -0
- package/dist/types/components/pointCloudView/PointCloudInfos.d.ts +19 -0
- package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +6 -0
- package/dist/types/components/pointCloudView/PointCloudListener.d.ts +6 -0
- package/dist/types/components/pointCloudView/PointCloudSideView.d.ts +6 -0
- package/dist/types/components/pointCloudView/PointCloudTopView.d.ts +6 -0
- package/dist/types/components/pointCloudView/hooks/useBoxes.d.ts +10 -0
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +61 -0
- package/dist/types/components/pointCloudView/hooks/usePolygon.d.ts +9 -0
- package/dist/types/components/pointCloudView/hooks/useRotate.d.ts +8 -0
- package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +13 -0
- package/dist/types/components/pointCloudView/hooks/useStatus.d.ts +11 -0
- package/dist/types/components/pointCloudView/index.d.ts +15 -0
- package/dist/types/components/videoPlayer/TagToolInstanceAdaptor.d.ts +1 -1
- package/dist/types/components/videoPlayer/index.d.ts +1 -1
- package/dist/types/hooks/annotation.d.ts +30 -0
- package/dist/types/hooks/useSize.d.ts +2 -2
- package/dist/types/index.d.ts +3 -1
- package/dist/types/store/Actions.d.ts +1 -0
- package/dist/types/store/annotation/actionCreators.d.ts +6 -5
- package/dist/types/store/annotation/map.d.ts +13 -0
- package/dist/types/store/annotation/reducer.d.ts +1 -1
- package/dist/types/store/annotation/types.d.ts +1 -0
- package/dist/types/utils/PageOperator.d.ts +1 -1
- package/dist/types/utils/StepUtils.d.ts +7 -0
- package/dist/types/utils/ToolUtils.d.ts +10 -0
- package/dist/types/utils/data.d.ts +1 -1
- package/dist/types/utils/dom.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +12 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +5 -1
- package/dist/types/views/MainView/sidebar/GeneralOperation/useOperationList.d.ts +12 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/index.d.ts +11 -0
- package/dist/types/views/MainView/sidebar/ToolIcons.d.ts +11 -0
- package/dist/types/views/MainView/sidebar/ToolStyle/index.d.ts +1 -1
- package/dist/types/views/MainView/sidebar/index.d.ts +1 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/Pagination.d.ts +12 -2
- package/dist/types/views/MainView/toolFooter/ZoomController/index.d.ts +14 -4
- package/dist/types/views/MainView/toolFooter/index.d.ts +7 -9
- package/dist/types/views/MainView/toolHeader/ExportData/index.d.ts +1 -1
- package/dist/utils/StepUtils.js +1 -1
- package/dist/utils/ToolUtils.js +1 -0
- package/dist/utils/data.js +1 -1
- package/dist/utils/dom.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -0
- package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
- package/dist/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/ToolIcons.js +1 -0
- package/dist/views/MainView/sidebar/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -0
- package/dist/views/MainView/toolFooter/Pagination.js +1 -1
- package/dist/views/MainView/toolFooter/ZoomController/index.js +1 -1
- package/dist/views/MainView/toolFooter/index.js +1 -1
- package/es/App.js +1 -1
- package/es/App.js.map +1 -1
- package/es/assets/annotation/lineTool/icon_line.svg.js +1 -0
- package/es/assets/annotation/lineTool/icon_line.svg.js.map +1 -0
- package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js.map +1 -0
- package/es/assets/annotation/pointCloudTool/copy.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/copy.svg.js.map +1 -0
- package/es/assets/annotation/pointCloudTool/nextBox.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/nextBox.svg.js.map +1 -0
- package/es/assets/annotation/pointCloudTool/patse.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/patse.svg.js.map +1 -0
- package/es/assets/annotation/pointCloudTool/prevBox.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/prevBox.svg.js.map +1 -0
- package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js.map +1 -0
- package/es/assets/annotation/pointCloudTool/selectAll.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/selectAll.svg.js.map +1 -0
- package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js.map +1 -0
- package/es/assets/annotation/pointTool/icon_point.svg.js +1 -0
- package/es/assets/annotation/pointTool/icon_point.svg.js.map +1 -0
- package/es/assets/annotation/polygonTool/icon_polygon.svg.js +1 -0
- package/es/assets/annotation/polygonTool/icon_polygon.svg.js.map +1 -0
- package/es/assets/annotation/rectTool/icon_rect.svg.js +1 -0
- package/es/assets/annotation/rectTool/icon_rect.svg.js.map +1 -0
- package/es/assets/annotation/rectTool/icon_rectPattern.svg.js +4 -1
- package/es/assets/annotation/rectTool/icon_rect_a.svg.js +1 -0
- package/es/assets/annotation/rectTool/icon_rect_a.svg.js.map +1 -0
- package/es/components/AnnotationView/index.js +1 -1
- package/es/components/AnnotationView/index.js.map +1 -1
- package/es/components/AnnotationView/pointCloudAnnotationView.js +1 -0
- package/es/components/AnnotationView/pointCloudAnnotationView.js.map +1 -0
- package/es/components/customResizeHook/index.js +1 -1
- package/es/components/customResizeHook/index.js.map +1 -1
- package/es/components/pointCloudView/PointCloud2DView.js +1 -0
- package/es/components/pointCloudView/PointCloud2DView.js.map +1 -0
- package/es/components/pointCloudView/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js.map +1 -0
- package/es/components/pointCloudView/PointCloudBackView.js +1 -0
- package/es/components/pointCloudView/PointCloudBackView.js.map +1 -0
- package/es/components/pointCloudView/PointCloudContext.js +1 -0
- package/es/components/pointCloudView/PointCloudContext.js.map +1 -0
- package/es/components/pointCloudView/PointCloudInfos.js +1 -0
- package/es/components/pointCloudView/PointCloudInfos.js.map +1 -0
- package/es/components/pointCloudView/PointCloudLayout.js +1 -1
- package/es/components/pointCloudView/PointCloudLayout.js.map +1 -0
- package/es/components/pointCloudView/PointCloudListener.js +1 -0
- package/es/components/pointCloudView/PointCloudListener.js.map +1 -0
- package/es/components/pointCloudView/PointCloudSideView.js +1 -0
- package/es/components/pointCloudView/PointCloudSideView.js.map +1 -0
- package/es/components/pointCloudView/PointCloudTopView.js +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js.map +1 -0
- package/es/components/pointCloudView/data.js +4 -0
- package/es/components/pointCloudView/data.js.map +1 -0
- package/es/components/pointCloudView/hooks/useBoxes.js +1 -0
- package/es/components/pointCloudView/hooks/useBoxes.js.map +1 -0
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -0
- package/es/components/pointCloudView/hooks/usePointCloudViews.js.map +1 -0
- package/es/components/pointCloudView/hooks/usePolygon.js +1 -0
- package/es/components/pointCloudView/hooks/usePolygon.js.map +1 -0
- package/es/components/pointCloudView/hooks/useRotate.js +1 -0
- package/es/components/pointCloudView/hooks/useRotate.js.map +1 -0
- package/es/components/pointCloudView/hooks/useSingleBox.js +1 -0
- package/es/components/pointCloudView/hooks/useSingleBox.js.map +1 -0
- package/es/components/pointCloudView/hooks/useStatus.js +1 -0
- package/es/components/pointCloudView/hooks/useStatus.js.map +1 -0
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/pointCloudView/index.js.map +1 -0
- package/es/hooks/annotation.js +1 -0
- package/es/hooks/annotation.js.map +1 -0
- package/es/hooks/useSize.js +1 -1
- package/es/hooks/useSize.js.map +1 -1
- package/es/index.css +1378 -0
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/store/Actions.js +1 -1
- package/es/store/Actions.js.map +1 -1
- package/es/store/annotation/actionCreators.js +1 -1
- package/es/store/annotation/actionCreators.js.map +1 -1
- package/es/store/annotation/map.js +1 -0
- package/es/store/annotation/map.js.map +1 -0
- package/es/store/annotation/reducer.js +1 -1
- package/es/store/annotation/reducer.js.map +1 -1
- package/es/utils/StepUtils.js +1 -1
- package/es/utils/StepUtils.js.map +1 -1
- package/es/utils/ToolUtils.js.map +1 -0
- package/es/utils/data.js +1 -1
- package/es/utils/data.js.map +1 -1
- package/es/utils/dom.js +1 -1
- package/es/utils/dom.js.map +1 -1
- package/es/utils/index.js +1 -1
- package/es/utils/index.js.map +1 -1
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/index.js.map +1 -1
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js.map +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
- package/es/views/MainView/sidebar/GeneralOperation/index.js.map +1 -1
- package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js.map +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js.map +1 -0
- package/es/views/MainView/sidebar/ToolIcons.js +1 -0
- package/es/views/MainView/sidebar/ToolIcons.js.map +1 -0
- package/es/views/MainView/sidebar/index.js +1 -1
- package/es/views/MainView/sidebar/index.js.map +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js.map +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js.map +1 -0
- package/es/views/MainView/toolFooter/Pagination.js +1 -1
- package/es/views/MainView/toolFooter/Pagination.js.map +1 -1
- package/es/views/MainView/toolFooter/ZoomController/index.js +1 -1
- package/es/views/MainView/toolFooter/ZoomController/index.js.map +1 -1
- package/es/views/MainView/toolFooter/index.js +1 -1
- package/es/views/MainView/toolFooter/index.js.map +1 -1
- package/package.json +9 -8
- package/dist/index.css.map +0 -1
package/dist/App.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var index$1=require("./views/MainView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactRedux=require("react-redux"),index=require("./index.js"),Actions=require("./store/Actions.js"),actionCreators=require("./store/annotation/actionCreators.js"),reducer=require("./store/annotation/reducer.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e};const App=e=>{const{imgList:t,step:r=1,stepList:s,onSubmit:l,onSave:c,onPageChange:u,onStepChange:d,initialIndex:a=0,toolInstance:n,setToolInstance:
|
|
1
|
+
"use strict";var index$1=require("./views/MainView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactRedux=require("react-redux"),index=require("./index.js"),Actions=require("./store/Actions.js"),actionCreators=require("./store/annotation/actionCreators.js"),reducer=require("./store/annotation/reducer.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e};const App=e=>{const{imgList:t,step:r=1,stepList:s,onSubmit:l,onSave:c,onPageChange:u,onStepChange:d,initialIndex:a=0,toolInstance:n,setToolInstance:i,getFileData:p,pageSize:f=10,loadFileList:o,defaultLang:v="cn",skipBeforePageTurning:g}=e;React.useEffect(()=>{index.store.dispatch(actionCreators.InitTaskData({onSubmit:l,stepList:s,step:r,getFileData:p,pageSize:f,loadFileList:o,onSave:c,onPageChange:u,onStepChange:d,skipBeforePageTurning:g})),_(),lbUtils.i18n.changeLanguage(v)},[]),React.useEffect(()=>{i==null||i(n)},[n]);const _=()=>{o?actionCreators.loadImgList(index.store.dispatch,index.store.getState,a,!0).then(m=>{m&&index.store.dispatch(reducer.LoadFileAndFileData(a))}):t&&t.length>0&&(index.store.dispatch({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:t}}),index.store.dispatch(reducer.LoadFileAndFileData(a)))};return React__default.default.createElement("div",null,React__default.default.createElement(index$1,__spreadValues({},e)))},mapStateToProps=e=>({toolInstance:e.annotation.toolInstance});var App$1=reactRedux.connect(mapStateToProps)(App);module.exports=App$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg id='icon_line' xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3crect id='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd_10' data-name='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd 10' class='cls-1' width='20' height='20'/%3e %3cpath id='%e5%bd%a2%e7%8a%b6%e7%bb%93%e5%90%88' class='cls-2' d='M3.889%2c15.556V13.042l9.153-9.153h2.514V0H11.667V2.514L2.514%2c11.667H0v3.889Z' transform='translate(2.222 2.222)'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect x='4.81982' y='12.3096' width='1.49968' height='10.4997' transform='rotate(-135 4.81982 12.3096)' fill='%23666666'/%3e%3cg clip-path='url(%23clip0_90_7913)'%3e%3cg clip-path='url(%23clip1_90_7913)'%3e%3cmask id='mask0_90_7913' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='9' y='10' width='7' height='6'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.91842 13.0569L15.1098 13.0582L15.7797 13.7267H11.5931L12.7653 15.0664H11.7605L9.91842 13.0569ZM15.2773 12.2195L10.0859 12.2182L9.41602 11.5497H13.6026L12.4304 10.21H13.4351L15.2772 12.2195H15.2773Z' fill='white'/%3e%3c/mask%3e%3cg mask='url(%23mask0_90_7913)'%3e%3cpath d='M7.88104 8.6748H17.3149V16.6014H7.88104V8.6748Z' fill='%23666666'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3crect x='14.0015' y='5.06738' width='2.99984' height='2.99984' transform='rotate(180 14.0015 5.06738)' fill='white' stroke='%23707070'/%3e%3crect x='5.00146' y='14.0674' width='2.99984' height='2.99984' transform='rotate(180 5.00146 14.0674)' fill='white' stroke='%23707070'/%3e%3cdefs%3e%3cclipPath id='clip0_90_7913'%3e%3crect width='6.36365' height='4.85646' fill='white' transform='translate(9.41602 10.21)'/%3e%3c/clipPath%3e%3cclipPath id='clip1_90_7913'%3e%3crect width='6.36365' height='4.85646' fill='white' transform='translate(9.41602 10.21)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4.33331 4.6437V3.104C4.33331 2.58624 4.75305 2.1665 5.27081 2.1665H13.3958C13.9136 2.1665 14.3333 2.58624 14.3333 3.104V11.229C14.3333 11.7468 13.9136 12.1665 13.3958 12.1665H11.8387' stroke='%23666666' stroke-width='1.33333' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.7292 4.8335H2.60419C2.08642 4.8335 1.66669 5.25323 1.66669 5.771V13.896C1.66669 14.4138 2.08642 14.8335 2.60419 14.8335H10.7292C11.247 14.8335 11.6667 14.4138 11.6667 13.896V5.771C11.6667 5.25323 11.247 4.8335 10.7292 4.8335Z' stroke='%23666666' stroke-width='1.33333' stroke-linejoin='round'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.63151 12.7676L1.10109 5.19533C0.858489 4.91296 1.07723 4.49935 1.46897 4.49935H14.5298C14.9215 4.49935 15.1403 4.91296 14.8977 5.19533L8.36727 12.7676C8.18035 12.9844 7.81843 12.9844 7.6315 12.7676H7.63151Z' fill='%23666666'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4.33331 4.6437V3.104C4.33331 2.58624 4.75305 2.1665 5.27081 2.1665H13.3958C13.9136 2.1665 14.3333 2.58624 14.3333 3.104V11.229C14.3333 11.7468 13.9136 12.1665 13.3958 12.1665H11.8387' fill='%23CCCCCC'/%3e%3cpath d='M4.33331 4.6437V3.104C4.33331 2.58624 4.75305 2.1665 5.27081 2.1665H13.3958C13.9136 2.1665 14.3333 2.58624 14.3333 3.104V11.229C14.3333 11.7468 13.9136 12.1665 13.3958 12.1665H11.8387' stroke='%23666666' stroke-width='1.33333' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.7292 4.8335H2.60419C2.08642 4.8335 1.66669 5.25323 1.66669 5.771V13.896C1.66669 14.4138 2.08642 14.8335 2.60419 14.8335H10.7292C11.247 14.8335 11.6667 14.4138 11.6667 13.896V5.771C11.6667 5.25323 11.247 4.8335 10.7292 4.8335Z' fill='%23CCCCCC' stroke='%23666666' stroke-width='1.33333' stroke-linejoin='round'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.63151 4.23239L1.10109 11.8047C0.858489 12.087 1.07723 12.5006 1.46897 12.5006H14.5298C14.9215 12.5006 15.1403 12.087 14.8977 11.8047L8.36727 4.23239C8.18035 4.01564 7.81843 4.01564 7.6315 4.23239H7.63151Z' fill='%23666666'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14.0606 2.74219V5.16642H11.6364' stroke='%23666666' stroke-width='0.8' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M14.6667 8.50016C14.6667 12.1821 11.6819 15.1668 8.00002 15.1668C4.31812 15.1668 1.33335 12.1821 1.33335 8.50016C1.33335 4.81826 4.31812 1.8335 8.00002 1.8335C10.4674 1.8335 12.6217 3.17387 13.7744 5.1662' stroke='%23666666' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.219 11V6.016H3.281L2.518 6.611V7.661L3.281 7.115V11H4.219ZM7.6968 9.572C7.6968 9.299 7.6758 9.012 7.5638 8.781C7.4938 8.641 7.3958 8.529 7.2628 8.424C7.3818 8.326 7.4658 8.221 7.5288 8.095C7.6408 7.857 7.6618 7.612 7.6618 7.353C7.6618 6.926 7.5918 6.562 7.3048 6.275C7.0878 6.058 6.7798 5.96 6.4438 5.96C6.1078 5.96 5.8138 6.058 5.5968 6.275C5.3098 6.562 5.2398 6.926 5.2398 7.353C5.2398 7.612 5.2608 7.857 5.3728 8.095C5.4358 8.221 5.5198 8.326 5.6388 8.424C5.5058 8.529 5.4078 8.641 5.3378 8.781C5.2258 9.012 5.2048 9.299 5.2048 9.572C5.2048 10.041 5.2328 10.412 5.5618 10.734C5.7858 10.951 6.1148 11.056 6.4508 11.056C6.7868 11.056 7.1158 10.951 7.3398 10.734C7.6688 10.412 7.6968 10.041 7.6968 9.572ZM6.7588 9.523C6.7588 9.656 6.7728 9.978 6.6748 10.111C6.6258 10.174 6.5418 10.216 6.4508 10.216C6.3598 10.216 6.2758 10.181 6.2268 10.111C6.1288 9.971 6.1428 9.656 6.1428 9.523C6.1428 9.39 6.1218 9.061 6.2268 8.921C6.2758 8.851 6.3598 8.816 6.4508 8.816C6.5418 8.816 6.6188 8.851 6.6748 8.921C6.7798 9.061 6.7588 9.39 6.7588 9.523ZM6.7238 7.402C6.7238 7.528 6.7518 7.843 6.6258 7.969C6.5838 8.011 6.5208 8.032 6.4508 8.032C6.3808 8.032 6.3248 8.011 6.2758 7.969C6.1428 7.85 6.1778 7.528 6.1778 7.402C6.1778 7.283 6.1568 7.003 6.2548 6.884C6.3038 6.828 6.3738 6.8 6.4508 6.8C6.5278 6.8 6.5978 6.828 6.6468 6.884C6.7448 7.003 6.7238 7.283 6.7238 7.402ZM10.6496 9.838V7.178C10.6496 6.744 10.5306 6.492 10.3066 6.282C10.0826 6.065 9.75359 5.96 9.41759 5.96C9.08159 5.96 8.75259 6.065 8.52859 6.282C8.30459 6.492 8.18559 6.744 8.18559 7.178V9.838C8.18559 10.272 8.30459 10.524 8.52859 10.734C8.75259 10.951 9.08159 11.056 9.41759 11.056C9.75359 11.056 10.0826 10.951 10.3066 10.734C10.5306 10.524 10.6496 10.272 10.6496 9.838ZM9.71159 9.873C9.71159 10.104 9.58559 10.216 9.41759 10.216C9.24959 10.216 9.12359 10.104 9.12359 9.873V7.143C9.12359 6.912 9.24959 6.8 9.41759 6.8C9.58559 6.8 9.71159 6.912 9.71159 7.143V9.873ZM13.6304 7.129C13.6304 6.443 13.0774 5.89 12.3914 5.89C11.7054 5.89 11.1524 6.443 11.1524 7.129C11.1524 7.815 11.7054 8.368 12.3914 8.368C13.0774 8.368 13.6304 7.815 13.6304 7.129ZM12.8044 7.129C12.8044 7.36 12.6224 7.542 12.3914 7.542C12.1604 7.542 11.9784 7.36 11.9784 7.129C11.9784 6.898 12.1604 6.716 12.3914 6.716C12.6224 6.716 12.8044 6.898 12.8044 7.129Z' fill='%23666666'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11.3334 2.1665H2.66669C2.1144 2.1665 1.66669 2.61422 1.66669 3.1665V11.8332C1.66669 12.3855 2.1144 12.8332 2.66669 12.8332H11.3334C11.8857 12.8332 12.3334 12.3855 12.3334 11.8332V3.1665C12.3334 2.61422 11.8857 2.1665 11.3334 2.1665Z' stroke='%23666666' stroke-width='1.33333' stroke-linejoin='round'/%3e%3cpath d='M14.6666 4.83398V14.5C14.6666 14.8682 14.3681 15.1667 13.9999 15.1667H4.33447' stroke='%23666666' stroke-width='1.33333' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.33331 7.32861L6.33321 9.17031L9.66665 5.73975' stroke='%23666666' stroke-width='1.33333' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14 7.16667V13.5C14 14.0523 13.5523 14.5 13 14.5H3C2.44772 14.5 2 14.0523 2 13.5V3.5C2 2.94772 2.44772 2.5 3 2.5H10' stroke='%23666666' stroke-width='1.33333' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33331 7.16683L8.66665 9.8335L13.6666 2.8335' stroke='%23666666' stroke-width='1.33333' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11.125 1H8.875V5.5H11.125V1Z' fill='%23999999'/%3e%3cpath d='M11.125 14.5H8.875V19H11.125V14.5Z' fill='%23999999'/%3e%3cpath d='M14.5 8.96582V11.2158H19V8.96582H14.5Z' fill='%23999999'/%3e%3cpath d='M1 8.96582L1 11.2158H5.5V8.96582H1Z' fill='%23999999'/%3e%3cpath d='M10 13C11.6569 13 13 11.6569 13 10C13 8.34315 11.6569 7 10 7C8.34315 7 7 8.34315 7 10C7 11.6569 8.34315 13 10 13Z' fill='%23999999'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M17 17H15V15H17V17ZM17 13H15V11H17V13ZM17 9H15V7H17V9ZM17 5H15V3H17V5Z' fill='%23999999'/%3e%3cpath d='M17 17H15.4286V15H17V17ZM13.8571 17H12.2857V15H13.8571V17ZM10.7143 17H9.14286V15H10.7143V17ZM7.57143 17H6V15H7.57143V17Z' fill='%23999999'/%3e%3cpath d='M18 2H14V6H18V2Z' fill='%23999999'/%3e%3cpath d='M6 14H2V18H6V14Z' fill='%23999999'/%3e%3cpath d='M18 14H14V18H18V14Z' fill='%23999999'/%3e%3cpath d='M15.2236 3L16.6378 4.41421L4.4144 16.6377L3.00019 15.2234L15.2236 3Z' fill='%23999999'/%3e%3cpath d='M15 15L15 17L5 17L5 15L15 15Z' fill='%23999999'/%3e%3cpath d='M15 6H17V15H15V6Z' fill='%23999999'/%3e%3c/svg%3e";module.exports=img;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M17 5H15.4286V3H17V5ZM13.8571 5H12.2857V3H13.8571V5ZM10.7143 5H9.14286V3H10.7143V5ZM7.57143 5H6V3H7.57143V5Z' fill='%23999999'/%3e%3cpath d='M17 17H15V15H17V17ZM17 13H15V11H17V13ZM17 9H15V7H17V9ZM17 5H15V3H17V5Z' fill='%23999999'/%3e%3cpath d='M17 17H15.4286V15H17V17ZM13.8571 17H12.2857V15H13.8571V17ZM10.7143 17H9.14286V15H10.7143V17ZM7.57143 17H6V15H7.57143V17Z' fill='%23999999'/%3e%3cpath d='M6 2H2V6H6V2Z' fill='%23999999'/%3e%3cpath d='M18 2H14V6H18V2Z' fill='%23999999'/%3e%3cpath d='M6 14H2V18H6V14Z' fill='%23999999'/%3e%3cpath d='M18 14H14V18H18V14Z' fill='%23999999'/%3e%3cpath d='M5 6H3V15H5V6Z' fill='white'/%3e%3cpath d='M3 6H5V15H3V6Z' fill='%23999999'/%3e%3cpath d='M15 3L15 5L5 5L5 3L15 3Z' fill='%23999999'/%3e%3cpath d='M15 15L15 17L5 17L5 15L15 15Z' fill='%23999999'/%3e%3cpath d='M15 6H17V15H15V6Z' fill='%23999999'/%3e%3c/svg%3e";module.exports=img;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.2503 19.8382C16.4411 19.8382 19.8384 16.441 19.8384 12.2502C19.8384 8.05939 16.4411 4.66211 12.2503 4.66211C8.05952 4.66211 4.66223 8.05939 4.66223 12.2502C4.66223 16.441 8.05952 19.8382 12.2503 19.8382Z" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M12.2502 4.02984V1.50049" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M12.2502 23.0001V20.4707" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M23 12.25H20.4706" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path d="M4.02984 12.25H1.50049" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
<path d="M12.2501 13.5147C12.9486 13.5147 13.5148 12.9485 13.5148 12.25C13.5148 11.5515 12.9486 10.9854 12.2501 10.9854C11.5516 10.9854 10.9854 11.5515 10.9854 12.25C10.9854 12.9485 11.5516 13.5147 12.2501 13.5147Z" fill="white"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M21 10.5H8V20.5H21V10.5Z" stroke="white" stroke-width="1.2" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M3 14C3 9.02944 7.02944 5 12 5" stroke="white" stroke-width="1.2"/>
|
|
4
|
+
<path d="M11.1546 2.20832L11.1492 3.9226L11.1519 5.91278V7.62439C11.1492 7.7985 11.3528 7.89493 11.4894 7.78778L14.9206 5.07975C15.0251 4.99403 15.0278 4.83332 14.9206 4.75028L11.4921 2.04492C11.3581 1.93778 11.1546 2.03421 11.1546 2.20832Z" fill="white"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M21.0908 3.36377V7.00012H17.4544" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M22 12C22 17.5229 17.5229 22 12 22C6.47715 22 2 17.5229 2 12C2 6.47715 6.47715 2 12 2C15.701 2 18.9324 4.01056 20.6616 6.99905" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M8.536 15V9.304H7.464L6.592 9.984V11.184L7.464 10.56V15H8.536ZM12.5106 13.368C12.5106 13.056 12.4866 12.728 12.3586 12.464C12.2786 12.304 12.1666 12.176 12.0146 12.056C12.1506 11.944 12.2466 11.824 12.3186 11.68C12.4466 11.408 12.4706 11.128 12.4706 10.832C12.4706 10.344 12.3906 9.928 12.0626 9.6C11.8146 9.352 11.4626 9.24 11.0786 9.24C10.6946 9.24 10.3586 9.352 10.1106 9.6C9.78263 9.928 9.70263 10.344 9.70263 10.832C9.70263 11.128 9.72663 11.408 9.85463 11.68C9.92663 11.824 10.0226 11.944 10.1586 12.056C10.0066 12.176 9.89463 12.304 9.81463 12.464C9.68663 12.728 9.66263 13.056 9.66263 13.368C9.66263 13.904 9.69463 14.328 10.0706 14.696C10.3266 14.944 10.7026 15.064 11.0866 15.064C11.4706 15.064 11.8466 14.944 12.1026 14.696C12.4786 14.328 12.5106 13.904 12.5106 13.368ZM11.4386 13.312C11.4386 13.464 11.4546 13.832 11.3426 13.984C11.2866 14.056 11.1906 14.104 11.0866 14.104C10.9826 14.104 10.8866 14.064 10.8306 13.984C10.7186 13.824 10.7346 13.464 10.7346 13.312C10.7346 13.16 10.7106 12.784 10.8306 12.624C10.8866 12.544 10.9826 12.504 11.0866 12.504C11.1906 12.504 11.2786 12.544 11.3426 12.624C11.4626 12.784 11.4386 13.16 11.4386 13.312ZM11.3986 10.888C11.3986 11.032 11.4306 11.392 11.2866 11.536C11.2386 11.584 11.1666 11.608 11.0866 11.608C11.0066 11.608 10.9426 11.584 10.8866 11.536C10.7346 11.4 10.7746 11.032 10.7746 10.888C10.7746 10.752 10.7506 10.432 10.8626 10.296C10.9186 10.232 10.9986 10.2 11.0866 10.2C11.1746 10.2 11.2546 10.232 11.3106 10.296C11.4226 10.432 11.3986 10.752 11.3986 10.888ZM15.8853 13.672V10.632C15.8853 10.136 15.7493 9.848 15.4933 9.608C15.2373 9.36 14.8613 9.24 14.4773 9.24C14.0933 9.24 13.7173 9.36 13.4613 9.608C13.2053 9.848 13.0693 10.136 13.0693 10.632V13.672C13.0693 14.168 13.2053 14.456 13.4613 14.696C13.7173 14.944 14.0933 15.064 14.4773 15.064C14.8613 15.064 15.2373 14.944 15.4933 14.696C15.7493 14.456 15.8853 14.168 15.8853 13.672ZM14.8133 13.712C14.8133 13.976 14.6693 14.104 14.4773 14.104C14.2853 14.104 14.1413 13.976 14.1413 13.712V10.592C14.1413 10.328 14.2853 10.2 14.4773 10.2C14.6693 10.2 14.8133 10.328 14.8133 10.592V13.712ZM19.2919 10.576C19.2919 9.792 18.6599 9.16 17.8759 9.16C17.0919 9.16 16.4599 9.792 16.4599 10.576C16.4599 11.36 17.0919 11.992 17.8759 11.992C18.6599 11.992 19.2919 11.36 19.2919 10.576ZM18.3479 10.576C18.3479 10.84 18.1399 11.048 17.8759 11.048C17.6119 11.048 17.4039 10.84 17.4039 10.576C17.4039 10.312 17.6119 10.104 17.8759 10.104C18.1399 10.104 18.3479 10.312 18.3479 10.576Z" fill="white"/>
|
|
5
|
+
</svg>
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),es=require("antd/es");function _interopDefaultLegacy(
|
|
1
|
+
"use strict";var React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),es=require("antd/es");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,r,o)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,__spreadValues=(e,r)=>{for(var o in r||(r={}))__hasOwnProp.call(r,o)&&__defNormalProp(e,o,r[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(r))__propIsEnum.call(r,o)&&__defNormalProp(e,o,r[o]);return e};const DEFAULT_SIZE={width:1280,height:720},sizeInitialized=e=>e?(e.width||(e.width=DEFAULT_SIZE.width),e.height||(e.height=DEFAULT_SIZE.height),e):DEFAULT_SIZE,AnnotationView=(e,r)=>{const{src:o,annotations:c=[],style:g={stroke:"blue",thickness:3},zoomChange:s,backgroundStyle:h={},onChange:d,showLoading:_=!1}=e,i=sizeInitialized(e.size),[p,f]=React.useState(!1),v=React.useRef(null),t=React.useRef();React.useImperativeHandle(r,()=>{const n=t.current;return n?{zoomIn:()=>n.zoomChanged(!0),zoomOut:()=>n.zoomChanged(!1),initImgPos:()=>n.initImgPos(),toolInstance:n}:{}},[t.current]),React.useEffect(()=>(v.current&&(t.current=new lbAnnotation.ViewOperation({container:v.current,size:i,style:g,annotations:c,config:"{}"}),t.current.init()),()=>{var n;(n=t.current)==null||n.destroy()}),[]),React.useEffect(()=>{var n;t.current&&(f(!0),(n=t.current)==null||n.setLoading(!0),lbAnnotation.ImgUtils.load(o).then(u=>{var a,l;(a=t.current)==null||a.setLoading(!1),f(!1),(l=t.current)==null||l.setImgNode(u)}).catch(()=>{var u;(u=t.current)==null||u.setLoading(!1),f(!1)}))},[o]),React.useEffect(()=>{t.current&&t.current.updateData(c)},[c]),React.useEffect(()=>{const n=t.current;(n==null?void 0:n.setSize)&&n.setSize(i)},[i==null?void 0:i.width,i==null?void 0:i.height]),React.useEffect(()=>{var n,u;return t.current&&((n=t.current)==null||n.on("onChange",(...a)=>{d==null||d.apply(null,a)}),(u=t.current)==null||u.on("renderZoom",a=>{s&&s(a)})),()=>{var a,l;(a=t.current)==null||a.unbindAll("onChange"),(l=t.current)==null||l.unbindAll("renderZoom")}},[s,d]);const m=React__default.default.createElement("div",{ref:v,style:__spreadValues(__spreadValues({position:"relative"},i),h)});return React__default.default.createElement(es.Spin,{spinning:_||p,delay:300},m)};var AnnotationView$1=React__default.default.forwardRef(AnnotationView);module.exports=AnnotationView$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const PointCloudAnnotationView=t=>{const{src:n,result:a,size:o}=t;let l=React.useRef();const r=React.useRef(),c=React.useCallback(e=>{l.current=e},[]);return React.useEffect(()=>{const e=new lbAnnotation.PointCloud({container:l.current,backgroundColor:"#ccc"});r.current=e},[]),React.useEffect(()=>{var e;(e=r.current)==null||e.init()},[o]),React.useEffect(()=>{var e;r.current&&n&&((e=r.current)==null||e.loadPCDFile(n))},[n]),React.useEffect(()=>{a&&lbUtils.PointCloudUtils.getBoxParamsFromResultList(a).forEach(u=>{var i;(i=r.current)==null||i.generateBox(u,u.id)})},[a]),React__default.default.createElement("div",{style:o,ref:c})};module.exports=PointCloudAnnotationView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var AnnotationSize=require("../../data/enums/AnnotationSize.js"),lbAnnotation=require("@labelbee/lb-annotation"),React=require("react"),reactRedux=require("react-redux"),actionCreators=require("../../store/annotation/actionCreators.js"),antd=require("antd");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const EKeyCode=lbAnnotation.cKeyCode.default,viewportContext=React__default.default.createContext({width:window.innerWidth,height:window.innerHeight}),ViewportProviderComponent=e=>{const{children:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var AnnotationSize=require("../../data/enums/AnnotationSize.js"),lbAnnotation=require("@labelbee/lb-annotation"),React=require("react"),reactRedux=require("react-redux"),actionCreators=require("../../store/annotation/actionCreators.js"),antd=require("antd");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const EKeyCode=lbAnnotation.cKeyCode.default,viewportContext=React__default.default.createContext({width:window.innerWidth,height:window.innerHeight}),ViewportProviderComponent=e=>{const{children:d,dispatch:n,annotation:{skipBeforePageTurning:o}}=e;console.log("viewport",e);const[i]=React.useState(window.innerWidth),[r]=React.useState(window.innerHeight),a=t=>{var c;if(!!lbAnnotation.toolUtils.hotkeyFilter(t)){if(!t.shiftKey||!t.ctrlKey){if(t.keyCode===EKeyCode.A){if(o){o(()=>n(actionCreators.PageBackward()));return}n(actionCreators.PageBackward())}if(t.keyCode===EKeyCode.D){if(o){o(()=>n(actionCreators.PageForward()));return}n(actionCreators.PageForward())}t.keyCode===EKeyCode.R&&n(actionCreators.UpdateRotate())}if(t.shiftKey===!0&&t.ctrlKey===!0&&t.altKey===!0&&t.keyCode===EKeyCode.C){antd.message.success("DEVELOPMENT TESTING - Switch Last Two Canvas");const u=(c=e.annotation)==null?void 0:c.annotationEngine.switchLastTwoCanvas();if(!u)return;n(actionCreators.UpdateToolInstance(u))}}};React.useEffect(()=>(window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}),[e.annotation.annotationEngine,e.annotation.skipBeforePageTurning]);const s=React.useMemo(()=>({width:i,height:r}),[i,r]);return React__default.default.createElement(viewportContext.Provider,{value:s},d)},ViewportProvider=reactRedux.connect(e=>({annotation:e.annotation}))(ViewportProviderComponent),getFormatSize=(e,d=!1,n=!1)=>{const{width:o,height:i}=e,r=AnnotationSize.headerHeight+AnnotationSize.footerHeight,a=n?40+r+40:r,s=d?AnnotationSize.editStepWidth+AnnotationSize.sidebarWidth:AnnotationSize.sidebarWidth;return{width:o-s,height:i-a}};exports.ViewportProvider=ViewportProvider,exports.ViewportProviderComponent=ViewportProviderComponent,exports.getFormatSize=getFormatSize,exports.viewportContext=viewportContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloudLayout=require("./PointCloudLayout.js"),index=require("../AnnotationView/index.js"),PointCloudContext=require("./PointCloudContext.js"),reactRedux=require("react-redux"),icons=require("@ant-design/icons"),useSize=require("../../hooks/useSize.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e};const Toolbar=({onNext:e,onPrev:t,imgLength:n,imgIndex:a})=>React__default.default.createElement("div",null,React__default.default.createElement(icons.LeftOutlined,{onClick:t}),React__default.default.createElement("span",null," ",a+1," / ",n," "),React__default.default.createElement(icons.RightOutlined,{onClick:e})),PointCloud2DView=({imgInfo:e})=>{var t,n;const[a,f]=React.useState([]),{pointCloudBoxList:u,topViewInstance:s}=React.useContext(PointCloudContext.PointCloudContext),[i,c]=React.useState(0),d=React.useRef(null),m=useSize(d),r=(t=e==null?void 0:e.mappingImgList)==null?void 0:t[i];if(React.useEffect(()=>{if(s&&r){const{pointCloudInstance:o}=s,v={fill:"transparent",color:"green"},g=u.reduce((C,P)=>{const _=o.pointCloudLidar2image(P,r.calib);return[...C,..._.map(p=>({type:p.type,annotation:__spreadValues({pointList:p.pointList},v)}))]},[]);f(g)}},[u,r]),!e)return React__default.default.createElement("div",null);const{mappingImgList:l}=e;return l?(console.log("render",a),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-2d-container"),title:"2D\u89C6\u56FE",toolbar:React__default.default.createElement(Toolbar,{imgIndex:i,imgLength:l.length,onNext:()=>{i>=l.length-1||c(o=>o+1)},onPrev:()=>{i<=0||c(o=>o-1)}})},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-2d-image"),ref:d},React__default.default.createElement(index,{src:(n=r==null?void 0:r.url)!=null?n:"",annotations:a,size:m})))):React__default.default.createElement("div",null)},mapStateToProps=e=>{const{imgList:t,imgIndex:n}=e.annotation;return{imgInfo:t[n]}};var PointCloud2DView$1=reactRedux.connect(mapStateToProps)(PointCloud2DView);module.exports=PointCloud2DView$1;
|
|
@@ -0,0 +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");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React);const pointCloudID="LABELBEE-POINTCLOUD",PointCloud3DContext=React__default.default.createContext({isActive:!1,setTarget3DView:()=>{},reset3DView:()=>{}}),PointCloudViewIcon=({perspectiveView:e})=>{const{isActive:a,setTarget3DView:s}=React.useContext(PointCloud3DContext),r=o=>classNames__default.default({[dom.getClassName("point-cloud-3d-view",o)]:!0,active:a});return React__default.default.createElement("span",{onClick:()=>{s(lbUtils.EPerspectiveView[e])},className:r(e.toLocaleLowerCase())})},PointCloud3DSideBar=()=>{const{reset3DView:e}=React.useContext(PointCloud3DContext);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("span",{onClick:()=>{e()},className:dom.getClassName("point-cloud-3d-view","reset")}))},PointCloud3D=({currentData:e})=>{const a=React.useContext(PointCloudContext.PointCloudContext),[s,r]=React.useState(!0),o=React.useRef(null),{initPointCloud3d:u}=usePointCloudViews.usePointCloudViews(),d=useSize(o);React.useEffect(()=>{!a.mainViewInstance||u==null||u()},[d]);const{selectedBox:n}=useSingleBox.useSingleBox(),c=i=>{var t;const l=n==null?void 0:n.info;l&&((t=a.mainViewInstance)==null||t.updateCameraByBox(l,i))},m=()=>{var i;(i=a.mainViewInstance)==null||i.resetCamera()};React.useEffect(()=>{var i;if(o.current&&(e==null?void 0:e.url)){let t=a.mainViewInstance;if(t||(t=new lbAnnotation.PointCloud({container:o.current,backgroundColor:"#4c4c4c"})),e.result){const l=lbUtils.PointCloudUtils.getBoxParamsFromResultList(e.result);l.forEach(f=>{t==null||t.generateBox(f)}),a.setPointCloudResult(l),a.setPointCloudValid((i=index.jsonParser(e.result))==null?void 0:i.valid)}a.setMainViewInstance(t)}},[e]),React.useEffect(()=>{n&&c(lbUtils.EPerspectiveView.Top)},[n]);const v=React.useMemo(()=>({reset3DView:m,setTarget3DView:c,isActive:!!n}),[n]),C=React__default.default.createElement("div",null,React__default.default.createElement("span",{style:{marginRight:8}},"\u663E\u793A\u7BAD\u5934"),React__default.default.createElement(antd.Switch,{size:"small",checked:s,onChange:i=>{var t;r(i),(t=a.mainViewInstance)==null||t.setShowDirection(i)}}));return React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-3d-container"),title:"3D\u89C6\u56FE",toolbar:C},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-3d-content")},React__default.default.createElement(PointCloud3DContext.Provider,{value:v},React__default.default.createElement(PointCloud3DSideBar,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-3d-view"),id:pointCloudID,ref:o})))};var PointCloud3DView=reactRedux.connect(map.aMapStateToProps)(PointCloud3D);module.exports=PointCloud3DView;
|
|
@@ -0,0 +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"),useSingleBox=require("./hooks/useSingleBox.js"),lbUtils=require("@labelbee/lb-utils"),PointCloudInfos=require("./PointCloudInfos.js"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js");function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(n,e,t)=>e in n?__defProp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,__spreadValues=(n,e)=>{for(var t in e||(e={}))__hasOwnProp.call(e,t)&&__defNormalProp(n,t,e[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))__propIsEnum.call(e,t)&&__defNormalProp(n,t,e[t]);return n};const TransferCanvas2WorldOffset=(n,e,t=1)=>{const{width:i,height:r}=e,a={x:n.x+i*t/2,y:n.y+r*t/2},o={x:e.width/2,y:e.height/2};return{offsetX:(o.x-a.x)/t,offsetY:-(o.y-a.y)/t}},updateBackViewByCanvas2D=(n,e,t,i,r)=>{const{offsetX:a,offsetY:o}=TransferCanvas2WorldOffset(n,t,e);if(r.camera.zoom=e,n){const c=Math.cos(i.rotation),s=Math.sin(i.rotation),l=a*c,u=a*s,{x:d,y:f,z:p}=r.initCameraPosition;r.camera.position.set(d+u,f-l,p+o)}r.camera.updateProjectionMatrix(),r.render()},PointCloudSideView=({currentData:n})=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),t=React.useRef(null),i=useSize(t),{updateSelectedBox:r,selectedBox:a}=useSingleBox.useSingleBox();return React.useEffect(()=>{if(t.current){const o={width:t.current.clientWidth,height:t.current.clientHeight},c=new lbAnnotation.PointCloudAnnotation({container:t.current,size:o,polygonOperationProps:{showDirectionLine:!1,forbidAddNew:!0}});e.setBackViewInstance(c)}},[]),React.useEffect(()=>{if(!i||!e.backViewInstance)return;const{pointCloud2dOperation:o,pointCloudInstance:c}=e.backViewInstance;o.singleOn("renderZoom",(s,l)=>{!e.selectedPointCloudBox||updateBackViewByCanvas2D(l,s,i,e.selectedPointCloudBox,c)}),o.singleOn("dragMove",({currentPos:s,zoom:l})=>{!e.selectedPointCloudBox||updateBackViewByCanvas2D(s,l,i,e.selectedPointCloudBox,c)}),o.singleOn("updatePolygonByDrag",({newPolygon:s,originPolygon:l})=>{if(!e.selectedPointCloudBox||!e.mainViewInstance||!n.url)return;const[u,d,f]=s.pointList,[p,w,v]=l.pointList,h=lbAnnotation.MathUtils.getLineCenterPoint([u,f]),g=lbAnnotation.MathUtils.getLineCenterPoint([p,v]),P={x:{x:h.x-g.x,y:h.y-g.y}.x,y:0,z:h.y-g.y},m=lbAnnotation.MathUtils.getLineLength(u,d),x=lbAnnotation.MathUtils.getLineLength(p,w),y=m-x,B=lbAnnotation.MathUtils.getLineLength(d,f),V=lbAnnotation.MathUtils.getLineLength(w,v),L=B-V,{newBoxParams:C}=c.getNewBoxByBackUpdate(P,L,y,e.selectedPointCloudBox);usePointCloudViews.synchronizeTopView(C,s,e.topViewInstance,e.mainViewInstance),usePointCloudViews.synchronizeSideView(C,s,e.sideViewInstance,n.url),e.mainViewInstance.hightLightOriginPointCloud(C),r(C)})},[e,i]),React.useEffect(()=>{var o;(o=e==null?void 0:e.backViewInstance)==null||o.initSize(i)},[i]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","back-view"),title:"\u80CC\u89C6\u56FE",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}),!a&&React__default.default.createElement("div",{style:__spreadValues({},i),className:dom.getClassName("point-cloud-container","empty-page")},"\u6682\u65E0\u6570\u636E")))};var PointCloudBackView=reactRedux.connect(map.aMapStateToProps)(PointCloudSideView);module.exports=PointCloudBackView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react");function _interopDefaultLegacy(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var React__default=_interopDefaultLegacy(React);const PointCloudContext=React__default.default.createContext({pointCloudBoxList:[],polygonList:[],selectedID:"",selectedIDs:[],valid:!0,setSelectedIDs:()=>{},setPointCloudResult:()=>{},setPointCloudValid:()=>{},setTopViewInstance:()=>{},setSideViewInstance:()=>{},setBackViewInstance:()=>{},setMainViewInstance:()=>{},addSelectedID:()=>{},selectedAllBoxes:()=>{},addPointCloudBox:()=>{},setPolygonList:()=>{}}),PointCloudProvider=({children:s})=>{const[o,a]=React.useState([]),[c,C]=React.useState([]),[t,i]=React.useState([]),[d,P]=React.useState(!0),[l,p]=React.useState(),[u,I]=React.useState(),[r,x]=React.useState(),[f,V]=React.useState(),S=React.useMemo(()=>t.length===1?t[0]:"",[t]),w=React.useMemo(()=>{const y=o.find(e=>e.id===S),v=e=>{a(o.concat(e))},B=e=>{P(e!==!1)},n=e=>{e===void 0&&i([]),typeof e=="string"&&i([e]),Array.isArray(e)&&i(Array.from(new Set(e)))};return{selectedID:S,pointCloudBoxList:o,selectedIDs:t,setPointCloudResult:a,setSelectedIDs:n,addPointCloudBox:v,valid:d,selectedPointCloudBox:y,setPointCloudValid:B,addSelectedID:e=>{t.includes(e)?n(t.filter(g=>g!==e)):n([...t,e])},selectedAllBoxes:()=>{n(o.map(e=>e.id))},topViewInstance:l,setTopViewInstance:p,sideViewInstance:u,setSideViewInstance:I,backViewInstance:r,setBackViewInstance:x,mainViewInstance:f,setMainViewInstance:V,polygonList:c,setPolygonList:C}},[d,t,o,c,l,u,r,f]);return React__default.default.createElement(PointCloudContext.Provider,{value:w},s)};exports.PointCloudContext=PointCloudContext,exports.PointCloudProvider=PointCloudProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const DECIMAL_PLACES=2,SizeInfoForView=({perspectiveView:e})=>{const{pointCloudBoxList:o,selectedID:n}=React__default.default.useContext(PointCloudContext.PointCloudContext),t=o.find(l=>l.id===n);if(n&&t){const l=e===lbUtils.EPerspectiveView.Back?[{label:"\u5BBD",value:t.width},{label:"\u9AD8",value:t.depth}]:[{label:"\u957F",value:t.height},{label:"\u5BBD",value:t.width}];return React__default.default.createElement(React__default.default.Fragment,null,l.map((a,u)=>React__default.default.createElement("span",{key:u,style:{marginRight:u===0?16:0,fontSize:12}},`${a.label}: ${a.value.toFixed(DECIMAL_PLACES)}`)))}return null},BoxInfos=()=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),{selectedID:o,pointCloudBoxList:n}=e,t=n.find(l=>l.id===o);if(o&&t){const{width:l,depth:a,height:u,rotation:r}=t,d=[{label:"\u957F",value:u.toFixed(DECIMAL_PLACES)},{label:"\u5BBD",value:l.toFixed(DECIMAL_PLACES)},{label:"\u9AD8",value:a.toFixed(DECIMAL_PLACES)},{label:"\u671D\u5411\u89D2",value:lbAnnotation.UnitUtils.rad2deg(r).toFixed(DECIMAL_PLACES)},{label:"\u70B9\u6570",value:1e3}];return React__default.default.createElement("div",{style:{position:"absolute",color:"white",backgroundColor:"rgba(153, 153, 153, 0.3)",right:8,top:8,fontSize:12,padding:8,zIndex:20}},d.map(i=>React__default.default.createElement("div",{key:i.label},`${i.label}: ${i.value}`)))}return null},PointCloudValidity=()=>React__default.default.useContext(PointCloudContext.PointCloudContext).valid===!1?React__default.default.createElement("div",{style:{position:"absolute",backgroundColor:"rgb(242, 101, 73)",color:"white",left:0,top:0,fontSize:20,padding:"8px 16px",zIndex:20}},"\u65E0\u6548"):null;exports.BoxInfos=BoxInfos,exports.PointCloudValidity=PointCloudValidity,exports.SizeInfoForView=SizeInfoForView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var dom=require("../../utils/dom.js"),classNames=require("classnames"),React=require("react");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React);const PointCloudContainer=({title:e,toolbar:a,children:t,className:r})=>React__default.default.createElement("div",{className:classNames__default.default([r,dom.getClassName("point-cloud-container")])},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","header")},React__default.default.createElement("span",{className:dom.getClassName("point-cloud-container","header-title")},e),a&&React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","header-toolbar")},a)),t);exports.PointCloudContainer=PointCloudContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useBoxes=require("./hooks/useBoxes.js"),useSingleBox=require("./hooks/useSingleBox.js"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),antd=require("antd"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),lbUtils=require("@labelbee/lb-utils"),annotation=require("../../hooks/annotation.js"),useStatus=require("./hooks/useStatus.js"),index=require("../../utils/index.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,e,n)=>e in o?__defProp(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,__spreadValues=(o,e)=>{for(var n in e||(e={}))__hasOwnProp.call(e,n)&&__defNormalProp(o,n,e[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(e))__propIsEnum.call(e,n)&&__defNormalProp(o,n,e[n]);return o},__spreadProps=(o,e)=>__defProps(o,__getOwnPropDescs(e));const{EPolygonPattern}=lbAnnotation.cTool,PointCloudListener=({currentData:o})=>{const e=React.useContext(PointCloudContext.PointCloudContext),{changeSelectedBoxValid:n,selectNextBox:b,selectPrevBox:x,updateSelectedBox:v}=useSingleBox.useSingleBox(),{clearAllResult:p}=useStatus.useStatus(),f=index.jsonParser(o.result),{copySelectedBoxes:C,pasteSelectedBoxes:w,copiedBoxes:m}=useBoxes.useBoxes(),{toolInstanceRef:i}=annotation.useCustomToolInstance({basicInfo:f}),{updateRotate:c}=useRotate.useRotate({currentData:o}),y=t=>{const{topViewInstance:s,mainViewInstance:l}=e;if(!s)return;const{pointCloud2dOperation:r}=s;switch(t){case"q":{c(2);break}case"e":c(-2);break;case"g":c(180);break;case"u":{const a=r.pattern===EPolygonPattern.Normal?EPolygonPattern.Rect:EPolygonPattern.Normal;r.setPattern(a);const d={[EPolygonPattern.Normal]:"Normal Pattern",[EPolygonPattern.Rect]:"Rect Pattern"};antd.message.success(`Change Pattern to ${d[a]} successfully`),r.clearActiveStatus(),r.clearDrawingStatus()}break;case"+":l==null||l.updatePointSize(!0);break;case"-":l==null||l.updatePointSize(!1);break;case"v":e.setPointCloudValid(!e.valid);break;case"z":b();break;case"c":x();break;case"f":n();break;default:return}},g=t=>{switch(t){case"c":C();break;case"v":w();break;case"a":e.selectedAllBoxes();break}},P=t=>{const s=t.key.toLocaleLowerCase();if(t.ctrlKey){g(s);return}y(s)};return React.useEffect(()=>{const{topViewInstance:t}=e;if(!!t)return window.addEventListener("keydown",P),()=>{window.removeEventListener("keydown",P)}},[e,m]),React.useEffect(()=>{var t,s,l,r;const a=e.mainViewInstance;if((o==null?void 0:o.url)&&a){if(a.loadPCDFile(o.url),e.pointCloudBoxList.forEach(u=>{a==null||a.removeObjectByName(u.id)}),o.result){const u=lbUtils.PointCloudUtils.getBoxParamsFromResultList(o.result),_=lbUtils.PointCloudUtils.getPolygonListFromResultList(o.result);u.forEach(B=>{a==null||a.generateBox(B)}),e.setPointCloudResult(u),e.setPolygonList(_)}else e.setPointCloudResult([]),e.setPolygonList([]);a.updateTopCamera();const d=(s=(t=index.jsonParser(o.result))==null?void 0:t.valid)!=null?s:!0;e.setPointCloudValid(d),(l=e.sideViewInstance)==null||l.clearAllData(),(r=e.backViewInstance)==null||r.clearAllData()}},[o,e.mainViewInstance]),React.useEffect(()=>{i.current.exportData=()=>[e.pointCloudBoxList,{valid:e.valid}],i.current.exportCustomData=()=>{var t;return{renderPolygon:(t=e.polygonList)!=null?t:[]}},i.current.setDefaultAttribute=t=>{const s=e.selectedPointCloudBox;s&&(s.attribute=t,v(s))},i.current.setSubAttribute=(t,s)=>{var l;const r=e.selectedPointCloudBox;if(r){const a=(l=r==null?void 0:r.subAttribute)!=null?l:{};r.subAttribute=__spreadProps(__spreadValues({},a),{[t]:s}),v(r)}},i.current.clearResult=()=>{p==null||p()}},[e.pointCloudBoxList,e.selectedID,e.valid,e.polygonList]),React.useEffect(()=>{i.current.setValid=t=>{i.current.valid=t,setTimeout(()=>{e.setPointCloudValid(t)})}},[]),null};var PointCloudListener$1=reactRedux.connect(map.aMapStateToProps)(PointCloudListener);module.exports=PointCloudListener$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),dom=require("../../utils/dom.js"),PointCloudLayout=require("./PointCloudLayout.js"),React=require("react"),lbUtils=require("@labelbee/lb-utils"),PointCloudContext=require("./PointCloudContext.js"),PointCloudInfos=require("./PointCloudInfos.js"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSingleBox=require("./hooks/useSingleBox.js"),useSize=require("../../hooks/useSize.js");function _interopDefaultLegacy(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var React__default=_interopDefaultLegacy(React);const TransferCanvas2WorldOffset=(o,e,a=1)=>{const{width:u,height:t}=e,i={x:o.x+u*a/2,y:o.y+t*a/2},n={x:e.width/2,y:e.height/2};return{offsetX:(n.x-i.x)/a,offsetY:-(n.y-i.y)/a}},updateSideViewByCanvas2D=(o,e,a,u,t)=>{const{offsetX:i,offsetY:n}=TransferCanvas2WorldOffset(o,a,e);if(t.camera.zoom=e,o){const l=Math.cos(u.rotation),s=Math.sin(u.rotation),r=i*l,c=i*s,{x:d,y:f,z:C}=t.initCameraPosition;t.camera.position.set(d-r,f-c,C+n)}t.camera.updateProjectionMatrix(),t.render()},PointCloudSideView=({currentData:o})=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),{sideViewUpdateBox:a}=usePointCloudViews.usePointCloudViews(),{selectedBox:u}=useSingleBox.useSingleBox(),t=React.useRef(null),i=useSize(t);return React.useEffect(()=>{if(t.current){const n={width:t.current.clientWidth,height:t.current.clientHeight},l=new lbAnnotation.PointCloudAnnotation({container:t.current,size:n,polygonOperationProps:{showDirectionLine:!1,forbidAddNew:!0}});e.setSideViewInstance(l)}},[]),React.useEffect(()=>{if(!i||!e.sideViewInstance)return;const{pointCloud2dOperation:n,pointCloudInstance:l}=e.sideViewInstance;n.singleOn("renderZoom",(s,r)=>{!e.selectedPointCloudBox||updateSideViewByCanvas2D(r,s,i,e.selectedPointCloudBox,l)}),n.singleOn("dragMove",({currentPos:s,zoom:r})=>{!e.selectedPointCloudBox||updateSideViewByCanvas2D(s,r,i,e.selectedPointCloudBox,l)}),n.singleOn("updatePolygonByDrag",({newPolygon:s,originPolygon:r})=>{a(s,r)})},[e,i]),React.useEffect(()=>{var n;(n=e==null?void 0:e.sideViewInstance)==null||n.initSize(i)},[i]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","side-view"),title:"\u4FA7\u89C6\u56FE",toolbar:React__default.default.createElement(PointCloudInfos.SizeInfoForView,{perspectiveView:lbUtils.EPerspectiveView.Left})},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}),!u&&React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","empty-page")},"\u6682\u65E0\u6570\u636E")))};var PointCloudSideView$1=reactRedux.connect(map.aMapStateToProps)(PointCloudSideView);module.exports=PointCloudSideView$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),index=require("../../views/MainView/toolFooter/index.js"),index$1=require("../../views/MainView/toolFooter/ZoomController/index.js"),icons=require("@ant-design/icons"),lbAnnotation=require("@labelbee/lb-annotation"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useSingleBox=require("./hooks/useSingleBox.js"),PointCloudLayout=require("./PointCloudLayout.js"),PointCloudInfos=require("./PointCloudInfos.js"),usePolygon=require("./hooks/usePolygon.js"),antd=require("antd"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const{EPolygonPattern}=lbAnnotation.cTool,TransferCanvas2WorldOffset=(e,l,t=1)=>{const{width:i,height:a}=l,r={x:e.x+i*t/2,y:e.y+a*t/2},u={x:l.width/2,y:l.height/2};return{offsetX:(u.x-r.x)/t,offsetY:-(u.y-r.y)/t}},TopViewToolbar=({currentData:e})=>{const{selectNextBox:l,selectPrevBox:t}=useSingleBox.useSingleBox(),{updateRotate:i}=useRotate.useRotate({currentData:e}),a=2,r=()=>{i(-a)},u=()=>{i(a)},d=()=>{i(180)};return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement("span",{onClick:u,className:dom.getClassName("point-cloud","rotate-reserve")}),React__default.default.createElement("span",{onClick:r,className:dom.getClassName("point-cloud","rotate")}),React__default.default.createElement("span",{onClick:d,className:dom.getClassName("point-cloud","rotate-180")}),React__default.default.createElement(index.FooterDivider,null),React__default.default.createElement(icons.UpSquareOutlined,{onClick:()=>{t()},className:dom.getClassName("point-cloud","prev")}),React__default.default.createElement(icons.DownSquareOutlined,{onClick:()=>{l()},className:dom.getClassName("point-cloud","next")}),React__default.default.createElement(index.FooterDivider,null),React__default.default.createElement(index$1.ZoomController,null))},ZAxisSlider=({setZAxisLimit:e,zAxisLimit:l})=>React__default.default.createElement("div",{style:{position:"absolute",top:128,right:8,height:"50%",zIndex:20}},React__default.default.createElement(antd.Slider,{vertical:!0,step:.5,max:10,min:.5,defaultValue:l,onAfterChange:t=>{e(t)}})),PointCloudTopView=({currentData:e})=>{const l=React.useRef(null),t=React__default.default.useContext(PointCloudContext.PointCloudContext),i=useSize(l),{addPolygon:a,deletePolygon:r}=usePolygon.usePolygon(),{deletePointCloudBox:u}=useSingleBox.useSingleBox(),[d,x]=React.useState(10),c=usePointCloudViews.usePointCloudViews();return React.useEffect(()=>{if(l.current&&(e==null?void 0:e.url)&&(e==null?void 0:e.result)){const o={width:l.current.clientWidth,height:l.current.clientHeight};if(t.topViewInstance){t.topViewInstance.updateData(e.url,e.result);return}const n=new lbAnnotation.PointCloudAnnotation({container:l.current,size:o,pcdPath:e.url});n.addPolygonListOnTopView(e.result),t.setTopViewInstance(n)}},[e]),React.useEffect(()=>{if(!i||!t.topViewInstance||!t.sideViewInstance)return;const{pointCloud2dOperation:o}=t.topViewInstance;o.singleOn("polygonCreated",n=>{if(o.pattern===EPolygonPattern.Normal||!(e==null?void 0:e.url)){a(n);return}c.topViewAddBox(n,i)}),o.singleOn("deletedObject",({id:n})=>{u(n),r(n)}),o.singleOn("deleteSelectedIDs",()=>{t.setSelectedIDs([])}),o.singleOn("addSelectedIDs",n=>{t.addSelectedID(n)}),o.singleOn("setSelectedIDs",n=>{t.setSelectedIDs(n)}),o.singleOn("updatePolygonByDrag",({newPolygon:n})=>{var s;(s=c.topViewUpdateBox)==null||s.call(c,n,i)})},[t,i,e,c]),React.useEffect(()=>{if(!(i==null?void 0:i.width)||!t.topViewInstance)return;t.topViewInstance.initSize(i),t.topViewInstance.updatePolygonList(t.pointCloudBoxList);const{topViewInstance:{pointCloudInstance:o,pointCloud2dOperation:n}}=t;n.singleOn("renderZoom",(s,p)=>{const{offsetX:f,offsetY:C}=TransferCanvas2WorldOffset(p,i,s);if(o.camera.zoom=s,p){const{x:m,y:v,z:g}=o.initCameraPosition;o.camera.position.set(m+C,v-f,g)}o.camera.updateProjectionMatrix(),o.render()}),n.singleOn("dragMove",({currentPos:s,zoom:p})=>{const{offsetX:f,offsetY:C}=TransferCanvas2WorldOffset(s,i,p);o.camera.zoom=p;const{x:m,y:v,z:g}=o.initCameraPosition;o.camera.position.set(m+C,v-f,g),o.render()})},[i]),React.useEffect(()=>{var o,n;(n=(o=t.topViewInstance)==null?void 0:o.pointCloudInstance)==null||n.applyZAxisPoints(d)},[d]),React.useEffect(()=>{c.topViewSelectedChanged()},[t.selectedIDs]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","top-view"),title:"\u4FEF\u89C6\u56FE",toolbar:React__default.default.createElement(TopViewToolbar,{currentData:e})},React__default.default.createElement("div",{style:{position:"relative",flex:1}},React__default.default.createElement("div",{style:{width:"100%",height:"100%"},ref:l}),React__default.default.createElement(PointCloudInfos.BoxInfos,null),React__default.default.createElement(ZAxisSlider,{zAxisLimit:d,setZAxisLimit:x}),React__default.default.createElement(PointCloudInfos.PointCloudValidity,null)))};var PointCloudTopView$1=reactRedux.connect(map.aMapStateToProps)(PointCloudTopView);module.exports=PointCloudTopView$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),_=require("lodash"),antd=require("antd"),usePointCloudViews=require("./usePointCloudViews.js"),PointCloudContext=require("../PointCloudContext.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_);const useBoxes=()=>{const{selectedIDs:e,pointCloudBoxList:t,setPointCloudResult:i}=React.useContext(PointCloudContext.PointCloudContext),[u,s]=React.useState([]),{pointCloudBoxListUpdated:n}=usePointCloudViews.usePointCloudViews(),l=o=>t.some(c=>o.some(C=>C.id===c.id)),r=React.useMemo(()=>t.filter(o=>e.includes(o.id)),[e,t]),a=React.useCallback(()=>{r.length>0?s(___default.default.cloneDeep(r)):(s([]),antd.message.error("\u590D\u5236\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u9009\u62E9\u5BF9\u5E94\u7684\u70B9\u4E91\u6570\u636E"))},[e,t]),d=React.useCallback(()=>{if(u.length===0){antd.message.error("\u9009\u8005\u5BF9\u5E94\u7684\u70B9\u4E91\u6570\u636E\u5E76\u8FDB\u884C\u590D\u5236");return}l(u)?antd.message.error("\u5B58\u5728\u91CD\u590DID,\u590D\u5236\u5931\u8D25"):(i(u),n==null||n(u),s([]))},[u,t]);return{copySelectedBoxes:a,pasteSelectedBoxes:d,copiedBoxes:u,selectedBoxes:r}};exports.useBoxes=useBoxes;
|
|
@@ -0,0 +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"),_=require("lodash"),reactRedux=require("react-redux"),StepUtils=require("../../../utils/StepUtils.js"),index=require("../../../utils/index.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var ___default=_interopDefaultLegacy(_);const DEFAULT_SCOPE=5,PointCloudView={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},transferCanvas2World=(t,n)=>{const{width:s,height:e}=n,{x:r,y:i}=t;return{x:-i+e/2,y:-(r-s/2)}},topViewPolygon2PointCloud=(t,n,s,e,r)=>{const[i,l,a,u]=t.pointList.map(x=>transferCanvas2World(x,n)),g=lbAnnotation.MathUtils.getLineCenterPoint([i,a]),v=lbAnnotation.MathUtils.getLineLength(i,l),f=lbAnnotation.MathUtils.getLineLength(l,a),C=lbAnnotation.MathUtils.getRadiusFromQuadrangle(t.pointList);let h=0,P=1;if(s){const x=s.getSensesPointZAxisInPolygon([i,l,a,u]);h=(x.maxZ+x.minZ)/2,P=x.maxZ-x.minZ}e&&(h=e.center.z,P=e.depth);const L={center:{x:g.x,y:g.y,z:h},width:f,height:v,depth:P,rotation:C,id:t.id,attribute:"",valid:!0};return r&&Object.assign(L,r),L},sideViewPolygon2PointCloud=(t,n,s,e)=>{const[r,i,l]=t.pointList,[a,u,g]=n.pointList,v=lbAnnotation.MathUtils.getLineCenterPoint([r,l]),f=lbAnnotation.MathUtils.getLineCenterPoint([a,g]),C={x:v.x-f.x,y:v.y-f.y},h=Math.cos(s.rotation),P=Math.sin(s.rotation),L={x:C.x,y:C.x*P+C.y*h,z:v.y-f.y},x=lbAnnotation.MathUtils.getLineLength(r,i),V=lbAnnotation.MathUtils.getLineLength(a,u),m=x-V,y=lbAnnotation.MathUtils.getLineLength(i,l),U=lbAnnotation.MathUtils.getLineLength(u,g),D=y-U,{newBoxParams:O}=e.getNewBoxBySideUpdate(L,D,m,s);return O},synchronizeSideView=(t,n,s,e)=>{if(!s)return;const{pointCloud2dOperation:r,pointCloudInstance:i}=s;i.loadPCDFileByBox(e,t,{width:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:l}=i.updateOrthoCamera(t,lbUtils.EPerspectiveView.Left);i.setInitCameraPosition(l);const{polygon2d:a,zoom:u}=i.getBoxSidePolygon2DCoordinate(t);i.camera.zoom=u,i.camera.updateProjectionMatrix(),i.render(),r.initPosition(),r.zoomChangeOnCenter(u),r.setResultAndSelectedID([{id:n.id,pointList:a,textAttribute:"",isRect:!0}],n.id)},synchronizeBackView=(t,n,s,e)=>{if(!s)return;const{pointCloud2dOperation:r,pointCloudInstance:i}=s;i.loadPCDFileByBox(e,t,{height:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:l}=i.updateOrthoCamera(t,lbUtils.EPerspectiveView.Back);i.setInitCameraPosition(l);const{polygon2d:a,zoom:u}=i.getBoxBackPolygon2DCoordinate(t);i.camera.zoom=u,i.camera.updateProjectionMatrix(),i.render(),r.initPosition(),r.zoomChangeOnCenter(u),r.setResultAndSelectedID([{id:n.id,pointList:a,textAttribute:"",isRect:!0}],n.id)},synchronizeTopView=(t,n,s,e)=>{if(!s||!e)return;e.generateBox(t,n.id),e.updateCameraByBox(t,lbUtils.EPerspectiveView.Top),e.render();const{pointCloud2dOperation:r,pointCloudInstance:i}=s,{polygon2d:l}=i.getBoxTopPolygon2DCoordinate(t),a=[...r.polygonList],u=a.find(g=>g.id===n.id);u?u.pointList=l:a.push({id:n.id,pointList:l,textAttribute:"",isRect:!0}),r.setResultAndSelectedID(a,n.id)},usePointCloudViews=()=>{const{topViewInstance:t,sideViewInstance:n,backViewInstance:s,mainViewInstance:e,addPointCloudBox:r,setSelectedIDs:i,selectedIDs:l,pointCloudBoxList:a,setPointCloudResult:u}=React.useContext(PointCloudContext.PointCloudContext),{updateSelectedBox:g}=useSingleBox.useSingleBox(),{currentData:v,config:f}=reactRedux.useSelector(o=>{const{stepList:d,step:c,imgList:p,imgIndex:B}=o.annotation;return{currentData:p[B],config:index.jsonParser(StepUtils.getCurrentStepInfo(c,d).config)}}),{selectedBox:C}=useSingleBox.useSingleBox(),h=C==null?void 0:C.info;if(!t||!n)return{topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{}};const{pointCloudInstance:P}=t,L=()=>{var o;return a.length>0?((o=a.sort((c,p)=>c.trackID-p.trackID).slice(-1)[0])==null?void 0:o.trackID)+1:1},x=o=>{e==null||e.generateBox(o),e==null||e.controls.update(),e==null||e.render()},V=(o,d)=>{var c,p,B;const w=topViewPolygon2PointCloud(o,d,P,void 0,{attribute:(B=(p=(c=f==null?void 0:f.attributeList)==null?void 0:c[0])==null?void 0:p.value)!=null?B:""}),I=t==null?void 0:t.pointCloud2dOperation,b=Object.assign(w,{trackID:L()});I.setSelectedIDs([o.id]),i(b.id),S(PointCloudView.Top,o,b),r(b)},m=()=>{const o=C==null?void 0:C.info,d=t==null?void 0:t.pointCloud2dOperation;if(d.setSelectedIDs(l),!o||!d)return;const c=d.selectedPolygon;S(PointCloudView.Top,c,o)},y=(o,d,c)=>{if(h){const p=sideViewPolygon2PointCloud(o,d,h,n.pointCloudInstance);g(p),S(c,o,p)}},U=(o,d)=>{y(o,d,PointCloudView.Side)},D=(o,d)=>{y(o,d,PointCloudView.Back)},O=(o,d)=>{if(h){const c=topViewPolygon2PointCloud(o,d,void 0,h);Object.assign(h,___default.default.pickBy(c,(p,B)=>["width","height","x","y"])),g(c),S(PointCloudView.Top,o,h)}},S=(o,d,c)=>{const p=v==null?void 0:v.url,B={[PointCloudView.Side]:()=>{synchronizeSideView(c,d,n,p)},[PointCloudView.Back]:()=>{s&&synchronizeBackView(c,d,s,p)},[PointCloudView.Top]:()=>{synchronizeTopView(c,d,t,e)}};Object.keys(B).forEach(w=>{w!==o&&B[w]()}),x(c),e==null||e.hightLightOriginPointCloud(c)};return{topViewAddBox:V,topViewSelectedChanged:m,topViewUpdateBox:O,sideViewUpdateBox:U,backViewUpdateBox:D,pointCloudBoxListUpdated:o=>{t.updatePolygonList(o),e==null||e.generateBoxes(o)},clearAllResult:()=>{a.forEach(o=>{e==null||e.removeObjectByName(o.id)}),e==null||e.render(),u([]),t.pointCloud2dOperation.clearActiveStatus(),t.pointCloud2dOperation.clearResult()},initPointCloud3d:()=>{!e||(e.initPerspectiveCamera(),e.initRenderer(),e.render())}}};exports.synchronizeBackView=synchronizeBackView,exports.synchronizeSideView=synchronizeSideView,exports.synchronizeTopView=synchronizeTopView,exports.topViewPolygon2PointCloud=topViewPolygon2PointCloud,exports.transferCanvas2World=transferCanvas2World,exports.usePointCloudViews=usePointCloudViews;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js");const usePolygon=()=>{const{polygonList:e,setPolygonList:t}=React.useContext(PointCloudContext.PointCloudContext);return{addPolygon:o=>{t(e.concat(o))},deletePolygon:o=>{const n=e.filter(s=>s.id!==o);t([...n])}}};exports.usePolygon=usePolygon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),usePointCloudViews=require("./usePointCloudViews.js"),useSingleBox=require("./useSingleBox.js"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation");const{ERotateDirection}=lbAnnotation.cAnnotation,useRotate=({currentData:o})=>{const e=React.useContext(PointCloudContext.PointCloudContext),{selectedBox:i,updateSelectedBox:a}=useSingleBox.useSingleBox();return{updateRotate:React.useCallback(s=>{const{topViewInstance:l,mainViewInstance:n}=e;if(!l||!n)return;const{pointCloud2dOperation:u}=l,t=i==null?void 0:i.info;if(!t||!(o==null?void 0:o.url)||!e.backViewInstance)return;a({rotation:t.rotation+Number(Math.PI*s)/180}),u.rotatePolygon(s,ERotateDirection.Anticlockwise);const r=u.selectedPolygon;n.generateBox(t),n.hightLightOriginPointCloud(t),usePointCloudViews.synchronizeSideView(t,r,e.sideViewInstance,o.url),usePointCloudViews.synchronizeBackView(t,r,e.backViewInstance,o.url),n.render()},[e.selectedID,e.pointCloudBoxList,e.setPointCloudResult,e.topViewInstance,o])}};exports.useRotate=useRotate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),_=require("lodash"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_);const{ESortDirection}=lbAnnotation.cAnnotation,useSingleBox=()=>{const{pointCloudBoxList:e,setPointCloudResult:c,topViewInstance:s,selectedIDs:a,selectedID:l,mainViewInstance:i,setSelectedIDs:x}=React.useContext(PointCloudContext.PointCloudContext),o=React.useMemo(()=>{const t=e.findIndex(n=>n.id===l);if(t>-1)return{info:e[t],index:t}},[l,e]),d=React.useCallback(t=>{(o==null?void 0:o.info)&&(e.splice(o.index,1,___default.default.merge(o.info,t)),c(___default.default.cloneDeep(e)))},[l,e]),f=React.useCallback(()=>{(o==null?void 0:o.info)&&d({valid:!o.info.valid})},[l]),u=React.useCallback((t=ESortDirection.ascend)=>{if(!s||a.length>1)return;const{pointCloud2dOperation:n}=s,r=n.switchToNextPolygon(t);r&&x(r)},[s]);return{selectedBox:o,updateSelectedBox:d,changeSelectedBoxValid:f,selectNextBox:u,selectPrevBox:()=>{u(ESortDirection.descend)},deletePointCloudBox:t=>{c(e.filter(n=>n.id!==t)),i==null||i.removeObjectByName(t),i==null||i.render()}}};exports.useSingleBox=useSingleBox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation");const{EToolName,EPolygonPattern}=lbAnnotation.cTool,useStatus=()=>{const{topViewInstance:t,mainViewInstance:e,pointCloudBoxList:a,setPointCloudResult:r}=React.useContext(PointCloudContext.PointCloudContext),[u,l]=React.useState(EToolName.Rect);return{clearAllResult:()=>{a.forEach(n=>{e==null||e.removeObjectByName(n.id)}),e==null||e.render(),r([]),t==null||t.pointCloud2dOperation.clearActiveStatus(),t==null||t.pointCloud2dOperation.clearResult()},updatePointCloudPattern:n=>{const o=t==null?void 0:t.pointCloud2dOperation;if(!!o)switch(o.clearActiveStatus(),n){case EToolName.Rect:o.setPattern(EPolygonPattern.Rect),l(EToolName.Rect);break;case EToolName.Polygon:o.setPattern(EPolygonPattern.Normal),l(EToolName.Polygon);break}},pointCloudPattern:u}};exports.useStatus=useStatus;
|
|
@@ -0,0 +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");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PointCloudView=({imgList:e})=>e.length===0?null:React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-wrapper")},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,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right-bottom")},React__default.default.createElement(PointCloudSideView,null),React__default.default.createElement(PointCloudBackView,null)))))),mapStateToProps=e=>({imgList:e.annotation.imgList});var PointCloudView$1=reactRedux.connect(mapStateToProps)(PointCloudView);module.exports=PointCloudView$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactRedux=require("react-redux"),Actions=require("../store/Actions.js");const useCustomToolInstance=({basicInfo:t}={})=>{var r;const s=reactRedux.useDispatch(),u=React.useRef({valid:(r=t==null?void 0:t.valid)!=null?r:!0,exportData:()=>[[],{}],exportCustomData:()=>({}),clearResult:()=>{},singleOn:()=>{},on:()=>{},setResult:()=>{},history:{initRecord:()=>{},pushHistory:()=>{}},setDefaultAttribute:e=>{},setSubAttribute:(e,a)=>{},setValid:()=>{}}),o=e=>{s({type:Actions.ANNOTATION_ACTIONS.SET_TOOL,payload:{instance:e}})},n=()=>{s({type:Actions.ANNOTATION_ACTIONS.SET_TOOL,payload:{instance:void 0}})};return React.useEffect(()=>(o(u.current),()=>{n()}),[]),{toolInstanceRef:u}};exports.useCustomToolInstance=useCustomToolInstance;
|
package/dist/hooks/useSize.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),ResizeObserver=require("resize-observer-polyfill"),dom=require("../utils/dom.js"),useRafState=require("./useRafState.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ResizeObserver__default=_interopDefaultLegacy(ResizeObserver);function useSize(e){const[s
|
|
1
|
+
"use strict";var React=require("react"),ResizeObserver=require("resize-observer-polyfill"),dom=require("../utils/dom.js"),useRafState=require("./useRafState.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ResizeObserver__default=_interopDefaultLegacy(ResizeObserver);function useSize(e){const[l,s]=useRafState(()=>{var t,r;const i=dom.getTargetElement(e);return{width:(t=(i||{}).clientWidth)!=null?t:0,height:(r=(i||{}).clientHeight)!=null?r:0}});return React.useLayoutEffect(()=>{const t=dom.getTargetElement(e);if(!t)return()=>{};const r=new ResizeObserver__default.default(i=>{i.forEach(u=>{var a,n;s({width:(a=u.target.clientWidth)!=null?a:0,height:(n=u.target.clientHeight)!=null?n:0})})});return r.observe(t),()=>{r.disconnect()}},[e]),l}module.exports=useSize;
|