@labelbee/lb-components 1.7.0-alpha.0 → 1.7.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/components/attributeList/index.js +1 -1
- package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
- package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
- package/dist/components/pointCloudView/PointCloudListener.js +1 -1
- package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
- package/dist/components/pointCloudView/hooks/useAttribute.js +1 -0
- package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/videoPlayer/components/controller/index.js +1 -1
- package/dist/constant/styleString.js +1 -1
- package/dist/store/annotation/map.js +1 -1
- package/dist/types/components/attributeList/index.d.ts +3 -2
- package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +2 -5
- package/dist/types/components/pointCloudView/PointCloud3DView.d.ts +3 -3
- package/dist/types/components/pointCloudView/PointCloudBackView.d.ts +2 -2
- package/dist/types/components/pointCloudView/PointCloudListener.d.ts +3 -3
- package/dist/types/components/pointCloudView/PointCloudSideView.d.ts +3 -3
- package/dist/types/components/pointCloudView/PointCloudTopView.d.ts +1 -1
- package/dist/types/components/pointCloudView/hooks/useAttribute.d.ts +7 -0
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +2 -1
- package/dist/types/constant/styleString.d.ts +1 -1
- package/dist/types/store/annotation/map.d.ts +5 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/index.d.ts +16 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js +1 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/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/components/attributeList/index.js +1 -1
- package/es/components/attributeList/index.js.map +1 -1
- package/es/components/pointCloudView/PointCloud2DView.js +1 -1
- package/es/components/pointCloudView/PointCloud2DView.js.map +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js.map +1 -1
- package/es/components/pointCloudView/PointCloudBackView.js +1 -1
- package/es/components/pointCloudView/PointCloudBackView.js.map +1 -1
- package/es/components/pointCloudView/PointCloudInfos.js +1 -1
- package/es/components/pointCloudView/PointCloudInfos.js.map +1 -1
- package/es/components/pointCloudView/PointCloudListener.js +1 -1
- package/es/components/pointCloudView/PointCloudListener.js.map +1 -1
- package/es/components/pointCloudView/PointCloudSideView.js +1 -1
- package/es/components/pointCloudView/PointCloudSideView.js.map +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js.map +1 -1
- package/es/components/pointCloudView/hooks/useAttribute.js +1 -0
- package/es/components/pointCloudView/hooks/useAttribute.js.map +1 -0
- package/es/components/pointCloudView/hooks/useHistory.js +1 -1
- package/es/components/pointCloudView/hooks/useHistory.js.map +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js.map +1 -1
- package/es/constant/styleString.js +1 -1
- package/es/constant/styleString.js.map +1 -1
- package/es/store/annotation/map.js +1 -1
- package/es/store/annotation/map.js.map +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js.map +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/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/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/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 +4 -4
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"),ctx=require("./store/ctx.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,
|
|
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"),ctx=require("./store/ctx.js"),Actions=require("./store/Actions.js"),actionCreators=require("./store/annotation/actionCreators.js"),reducer=require("./store/annotation/reducer.js"),es=require("antd/es"),zhCN=require("antd/es/locale/zh_CN"),enUS=require("antd/es/locale/en_US");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),zhCN__default=_interopDefaultLegacy(zhCN),enUS__default=_interopDefaultLegacy(enUS),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e};const App=e=>{const[t,a]=React.useState(0),{imgList:o,step:m=1,stepList:i,onSubmit:s,onSave:l,onPageChange:u,onStepChange:c,initialIndex:d=0,toolInstance:_,setToolInstance:h,getFileData:f,pageSize:g=10,loadFileList:r,defaultLang:p="cn",skipBeforePageTurning:I,beforeRotate:v}=e;React.useEffect(()=>{index.store.dispatch(actionCreators.InitTaskData({onSubmit:s,stepList:i,step:m,getFileData:f,pageSize:g,loadFileList:r,onSave:l,onPageChange:u,onStepChange:c,skipBeforePageTurning:I,beforeRotate:v})),L(),lbUtils.i18n.changeLanguage(p);const n=()=>{a(S=>S+1)};return lbUtils.i18n.on("languageChanged",n),()=>{lbUtils.i18n.off("languageChanged",n)}},[]),React.useEffect(()=>{index.store.dispatch(actionCreators.UpdateInjectFunc({onSubmit:s,stepList:i,getFileData:f,pageSize:g,loadFileList:r,onSave:l,onPageChange:u,onStepChange:c,beforeRotate:v})),lbUtils.i18n.changeLanguage(p)},[s,i,f,g,r,l,u,c,p,v]),React.useEffect(()=>{h==null||h(_)},[_]);const L=()=>{r?actionCreators.loadImgList(index.store.dispatch,index.store.getState,d,!0).then(n=>{n&&index.store.dispatch(reducer.LoadFileAndFileData(d))}):o&&o.length>0&&(index.store.dispatch({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:o}}),index.store.dispatch(reducer.LoadFileAndFileData(d)))};return React__default.default.createElement("div",null,React__default.default.createElement(es.ConfigProvider,{locale:lbUtils.i18n.language==="en"?enUS__default.default:zhCN__default.default},React__default.default.createElement(index$1,__spreadValues({},e))))},mapStateToProps=e=>({toolInstance:e.annotation.toolInstance});var App$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(App);module.exports=App$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Style=require("../../data/Style.js"),index=require("../colorTag/index.js"),es=require("antd/es"),React=require("react");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const ATTRIBUTE_COLORS=[Style.NULL_COLOR].concat(Style.COLORS_ARRAY),AttributeList=React__default.default.forwardRef((e,o)=>{const d=React__default.default.useRef(),f=e.list||[];let
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Style=require("../../data/Style.js"),index=require("../colorTag/index.js"),es=require("antd/es"),React=require("react");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const ATTRIBUTE_COLORS=[Style.NULL_COLOR].concat(Style.COLORS_ARRAY),AttributeList=React__default.default.forwardRef((e,o)=>{const d=React__default.default.useRef(),f=e.list||[];let u=[...ATTRIBUTE_COLORS];e.forbidDefault===!0&&(u=u.slice(1));let r="sensebee-radio-group";return e.noHeightLimit&&(r="sensebee-radio-group-no-limit-height"),React__default.default.createElement("div",{className:r,style:e.style},React__default.default.createElement(es.Radio.Group,{name:"radiogroup",defaultValue:e==null?void 0:e.selectedAttribute,value:e==null?void 0:e.selectedAttribute,onChange:t=>e.attributeChanged(t.target.value),ref:o},f.map((t,a)=>{var n;let l=(n=e==null?void 0:e.num)!=null?n:a;e.forbidDefault===!0&&typeof l=="number"&&l++,typeof l=="number"&&l<=9&&l>=0||(l="-");let i=a>8&&!e.forbidDefault?Style.COLORS_ARRAY[(a-1)%Style.COLORS_ARRAY.length]:u[a%u.length];return(t==null?void 0:t.color)&&(i=t.color),React__default.default.createElement(es.Radio,{value:t.value,ref:d,key:a},React__default.default.createElement("span",{className:"sensebee-radio-label",title:t.label},!(e==null?void 0:e.forbidColor)&&React__default.default.createElement(index.ColorTag,{color:i,style:{marginRight:"8px"}}),t.label),React__default.default.createElement("span",{className:"sensebee-radio-num"},l))})))});exports.ATTRIBUTE_COLORS=ATTRIBUTE_COLORS,exports.default=AttributeList;
|
|
@@ -1 +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"),useSingleBox=require("./hooks/useSingleBox.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 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:s})=>React__default.default.createElement("div",null,React__default.default.createElement(icons.LeftOutlined,{onClick:t}),React__default.default.createElement("span",null," ",s+1," / ",n," "),React__default.default.createElement(icons.RightOutlined,{onClick:e})),PointCloud2DView=({
|
|
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"),useSingleBox=require("./hooks/useSingleBox.js"),lbAnnotation=require("@labelbee/lb-annotation"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js"),map=require("../../store/annotation/map.js"),lbUtils=require("@labelbee/lb-utils");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var 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,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},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const Toolbar=({onNext:e,onPrev:t,imgLength:n,imgIndex:s})=>React__default.default.createElement("div",null,React__default.default.createElement(icons.LeftOutlined,{onClick:t}),React__default.default.createElement("span",null," ",s+1," / ",n," "),React__default.default.createElement(icons.RightOutlined,{onClick:e})),PointCloud2DView=({currentData:e,config:t})=>{var n,s,_,b,P;const[c,y]=React.useState([]),{pointCloudBoxList:x,topViewInstance:w}=React.useContext(PointCloudContext.PointCloudContext),[r,p]=React.useState(0),C=React.useRef(null),f=React.useRef(),{selectedBox:v}=useSingleBox.useSingleBox(),I=useSize(C),{t:O}=reactI18next.useTranslation(),a=(n=e==null?void 0:e.mappingImgList)==null?void 0:n[r];React.useEffect(()=>{p(0)},[e]),React.useEffect(()=>{if(w&&a){const o={fill:"transparent",color:"green"},l=x.reduce((u,i)=>{var d;const q=lbAnnotation.pointCloudLidar2image(i,a.calib),j=(d=lbUtils.toolStyleConverter.getColorFromConfig({attribute:i.attribute},__spreadProps(__spreadValues({},t),{attributeConfigurable:!0}),{}))==null?void 0:d.stroke;return[...u,...q.map(L=>({type:L.type,annotation:__spreadProps(__spreadValues({id:i.id,pointList:L.pointList},o),{stroke:j})}))]},[]);y(l)}},[x,a]);const m=!e||!(e==null?void 0:e.mappingImgList)||!(((s=e==null?void 0:e.mappingImgList)==null?void 0:s.length)>0),g=React.useCallback(()=>{var o,l;const u=(o=f.current)==null?void 0:o.toolInstance;if(!v||!u)return;const i=c.find(d=>d.annotation.id===v.info.id);((l=i==null?void 0:i.annotation.pointList)==null?void 0:l.length)>0&&u.focusPositionByPointList(i==null?void 0:i.annotation.pointList)},[v,f.current,c,r]);return React.useEffect(()=>{g()},[g]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-2d-container"),title:O("2DView"),toolbar:m?void 0:React__default.default.createElement(Toolbar,{imgIndex:r,imgLength:(b=(_=e.mappingImgList)==null?void 0:_.length)!=null?b:0,onNext:()=>{var o;!e||!(e==null?void 0:e.mappingImgList)||r>=((o=e==null?void 0:e.mappingImgList)==null?void 0:o.length)-1||p(l=>l+1)},onPrev:()=>{r<=0||p(o=>o-1)}}),style:{display:m?"none":"flex"}},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-2d-image"),ref:C},React__default.default.createElement(index,{src:(P=a==null?void 0:a.url)!=null?P:"",annotations:c,size:I,ref:f,globalStyle:{display:m?"none":"block"},afterImgOnLoad:g})))};var PointCloud2DView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloud2DView);module.exports=PointCloud2DView$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);const pointCloudID="LABELBEE-POINTCLOUD",PointCloud3DContext=React__default.default.createContext({isActive:!1,setTarget3DView:()=>{},reset3DView:()=>{}}),PointCloudViewIcon=({perspectiveView:e})=>{const{isActive:
|
|
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,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},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const pointCloudID="LABELBEE-POINTCLOUD",PointCloud3DContext=React__default.default.createContext({isActive:!1,setTarget3DView:()=>{},reset3DView:()=>{}}),PointCloudViewIcon=({perspectiveView:e})=>{const{isActive:t,setTarget3DView:r}=React.useContext(PointCloud3DContext),a=u=>classNames__default.default({[dom.getClassName("point-cloud-3d-view",u)]:!0,active:t});return React__default.default.createElement("span",{onClick:()=>{r(lbUtils.EPerspectiveView[e])},className:a(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,config:t})=>{var r;const a=React.useContext(PointCloudContext.PointCloudContext),[u,f]=React.useState(!0),s=React.useRef(null),{initPointCloud3d:c}=usePointCloudViews.usePointCloudViews(),C=useSize(s),{t:d}=reactI18next.useTranslation();React.useEffect(()=>{!a.mainViewInstance||c==null||c()},[C]);const{selectedBox:i}=useSingleBox.useSingleBox(),v=n=>{var o;const l=i==null?void 0:i.info;l&&((o=a.mainViewInstance)==null||o.updateCameraByBox(l,n))},w=()=>{var n;(n=a.mainViewInstance)==null||n.resetCamera()};React.useEffect(()=>{var n;if(s.current&&(e==null?void 0:e.url)){let o=a.mainViewInstance;if(o||(o=new lbAnnotation.PointCloud({container:s.current,backgroundColor:"#4c4c4c",config:t})),e.result){const l=lbUtils.PointCloudUtils.getBoxParamsFromResultList(e.result);l.forEach(m=>{var p;const x=(p=lbUtils.toolStyleConverter.getColorFromConfig({attribute:m.attribute},__spreadProps(__spreadValues({},t),{attributeConfigurable:!0}),{}))==null?void 0:p.hex;o==null||o.generateBox(m,x)}),a.setPointCloudResult(l),a.setPointCloudValid((n=index.jsonParser(e.result))==null?void 0:n.valid)}a.setMainViewInstance(o)}},[e]),React.useEffect(()=>{i&&v(lbUtils.EPerspectiveView.Top)},[i]);const P=React.useMemo(()=>({reset3DView:w,setTarget3DView:v,isActive:!!i}),[i]),g=React__default.default.createElement("div",null,React__default.default.createElement("span",{style:{marginRight:8}},d("ShowArrows")),React__default.default.createElement(antd.Switch,{size:"small",checked:u,onChange:n=>{var o;f(n),(o=a.mainViewInstance)==null||o.setShowDirection(n)}}));return React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-3d-container"),title:d("3DView"),toolbar:g,style:{height:e.mappingImgList&&((r=e.mappingImgList)==null?void 0:r.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:s})))};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"),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"),index=require("./components/EmptyPage/index.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var 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=(t,e
|
|
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"),index=require("./components/EmptyPage/index.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var 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=(t,n,e)=>n in t?__defProp(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,__spreadValues=(t,n)=>{for(var e in n||(n={}))__hasOwnProp.call(n,e)&&__defNormalProp(t,e,n[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(n))__propIsEnum.call(n,e)&&__defNormalProp(t,e,n[e]);return t},__spreadProps=(t,n)=>__defProps(t,__getOwnPropDescs(n));const TransferCanvas2WorldOffset=(t,n,e=1)=>{const{width:i,height:o}=n,c={x:t.x+i*e/2,y:t.y+o*e/2},d={x:n.width/2,y:n.height/2};return{offsetX:(d.x-c.x)/e,offsetY:-(d.y-c.y)/e}},updateBackViewByCanvas2D=(t,n,e,i,o)=>{const{offsetX:c,offsetY:d}=TransferCanvas2WorldOffset(t,e,n);if(o.camera.zoom=n,t){const P=Math.cos(i.rotation),s=Math.sin(i.rotation),l=c*P,a=c*s,{x:u,y:f,z:p}=o.initCameraPosition;o.camera.position.set(u+a,f-l,p+d)}o.camera.updateProjectionMatrix(),o.render()},PointCloudSideView=({currentData:t,config:n})=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),i=React.useRef(null),o=useSize(i),{updateSelectedBox:c,selectedBox:d}=useSingleBox.useSingleBox(),{t:P}=reactI18next.useTranslation();return React.useEffect(()=>{if(i.current){const s={width:i.current.clientWidth,height:i.current.clientHeight},l=new lbAnnotation.PointCloudAnnotation({container:i.current,size:s,polygonOperationProps:{showDirectionLine:!1,forbidAddNew:!0},config:n});e.setBackViewInstance(l)}},[]),React.useEffect(()=>{if(!o||!e.backViewInstance)return;const{pointCloud2dOperation:s,pointCloudInstance:l}=e.backViewInstance;s.singleOn("renderZoom",(a,u)=>{!e.selectedPointCloudBox||updateBackViewByCanvas2D(u,a,o,e.selectedPointCloudBox,l)}),s.singleOn("dragMove",({currentPos:a,zoom:u})=>{!e.selectedPointCloudBox||updateBackViewByCanvas2D(a,u,o,e.selectedPointCloudBox,l)}),s.singleOn("updatePolygonByDrag",({newPolygon:a,originPolygon:u})=>{if(!e.selectedPointCloudBox||!e.mainViewInstance||!t.url)return;const[f,p,x]=a.pointList,[C,w,v]=u.pointList,g=lbAnnotation.MathUtils.getLineCenterPoint([f,x]),h=lbAnnotation.MathUtils.getLineCenterPoint([C,v]),m={x:{x:g.x-h.x,y:g.y-h.y}.x,y:0,z:g.y-h.y},y=lbAnnotation.MathUtils.getLineLength(f,p),B=lbAnnotation.MathUtils.getLineLength(C,w),V=y-B,_=lbAnnotation.MathUtils.getLineLength(p,x),b=lbAnnotation.MathUtils.getLineLength(w,v),O=_-b;let{newBoxParams:r}=l.getNewBoxByBackUpdate(m,O,V,e.selectedPointCloudBox);if(e.mainViewInstance){const{count:I}=e.mainViewInstance.getSensesPointZAxisInPolygon(lbAnnotation.getCuboidFromPointCloudBox(r).polygonPointList,[r.center.z-r.depth/2,r.center.z+r.depth/2]);r=__spreadProps(__spreadValues({},r),{count:I})}usePointCloudViews.synchronizeTopView(r,a,e.topViewInstance,e.mainViewInstance),usePointCloudViews.synchronizeSideView(r,a,e.sideViewInstance,t.url),e.mainViewInstance.highlightOriginPointCloud(r),c(r)})},[e,o]),React.useEffect(()=>{var s;(s=e==null?void 0:e.backViewInstance)==null||s.initSize(o)},[o]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","back-view"),title:P("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:i}),!d&&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 lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useSingleBox=require("./hooks/useSingleBox.js"),reactI18next=require("react-i18next");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:n,selectedID:a}=React__default.default.useContext(PointCloudContext.PointCloudContext),l=n.find(i=>i.id===a),d=reactI18next.useTranslation(),{t}=d;if(a&&l){const{length:i,width:o,height:r}=lbUtils.PointCloudUtils.transferBox2Kitti(l),c=e===lbUtils.EPerspectiveView.Back?[{label:t("Width"),value:o},{label:t("Height"),value:r}]:[{label:t("Length"),value:i},{label:t("Height"),value:r}];return React__default.default.createElement(React__default.default.Fragment,null,c.map((u,s)=>React__default.default.createElement("span",{key:s,style:{marginRight:s===0?16:0,fontSize:12}},`${u.label}: ${u.value.toFixed(DECIMAL_PLACES)}`)))}return null},BoxInfos=()=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),{selectedBox:n}=useSingleBox.useSingleBox(),[a,l]=React.useState([]),d=reactI18next.useTranslation(),{t,i18n:i}=d;return React.useEffect(()=>{var o;if(!n)return;const{length:r,width:c,height:u,rotation_y:s}=lbUtils.PointCloudUtils.transferBox2Kitti(n.info);let f=[{label:t("Length"),value:r.toFixed(DECIMAL_PLACES)},{label:t("Width"),value:c.toFixed(DECIMAL_PLACES)},{label:t("Height"),value:u.toFixed(DECIMAL_PLACES)},{label:t("Rotation_y"),value:lbAnnotation.UnitUtils.rad2deg(s).toFixed(DECIMAL_PLACES)}];(o=e.mainViewInstance)==null||o.filterPointsByBox(n.info).then(x=>{if(!x){l(f);return}f.push({label:t("PointCount"),value:`${x.num}`}),l(f)})},[n,i.language]),n?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}},a.map(o=>React__default.default.createElement("div",{key:o.label},`${o.label}: ${o.value}`))):null},PointCloudValidity=()=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),{t:n}=reactI18next.useTranslation();return e.valid===!1?React__default.default.createElement("div",{style:{position:"absolute",backgroundColor:"rgb(242, 101, 73)",color:"white",left:0,top:0,fontSize:
|
|
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"),useSingleBox=require("./hooks/useSingleBox.js"),reactI18next=require("react-i18next");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:n,selectedID:a}=React__default.default.useContext(PointCloudContext.PointCloudContext),l=n.find(i=>i.id===a),d=reactI18next.useTranslation(),{t}=d;if(a&&l){const{length:i,width:o,height:r}=lbUtils.PointCloudUtils.transferBox2Kitti(l),c=e===lbUtils.EPerspectiveView.Back?[{label:t("Width"),value:o},{label:t("Height"),value:r}]:[{label:t("Length"),value:i},{label:t("Height"),value:r}];return React__default.default.createElement(React__default.default.Fragment,null,c.map((u,s)=>React__default.default.createElement("span",{key:s,style:{marginRight:s===0?16:0,fontSize:12}},`${u.label}: ${u.value.toFixed(DECIMAL_PLACES)}`)))}return null},BoxInfos=()=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),{selectedBox:n}=useSingleBox.useSingleBox(),[a,l]=React.useState([]),d=reactI18next.useTranslation(),{t,i18n:i}=d;return React.useEffect(()=>{var o;if(!n)return;const{length:r,width:c,height:u,rotation_y:s}=lbUtils.PointCloudUtils.transferBox2Kitti(n.info);let f=[{label:t("Length"),value:r.toFixed(DECIMAL_PLACES)},{label:t("Width"),value:c.toFixed(DECIMAL_PLACES)},{label:t("Height"),value:u.toFixed(DECIMAL_PLACES)},{label:t("Rotation_y"),value:lbAnnotation.UnitUtils.rad2deg(s).toFixed(DECIMAL_PLACES)}];(o=e.mainViewInstance)==null||o.filterPointsByBox(n.info).then(x=>{if(!x){l(f);return}f.push({label:t("PointCount"),value:`${x.num}`}),l(f)})},[n,i.language]),n?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}},a.map(o=>React__default.default.createElement("div",{key:o.label},`${o.label}: ${o.value}`))):null},PointCloudValidity=()=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),{t:n}=reactI18next.useTranslation();return e.valid===!1?React__default.default.createElement("div",{style:{position:"absolute",backgroundColor:"rgb(242, 101, 73)",color:"white",opacity:.7,left:0,top:0,fontSize:30,padding:"8px 16px",zIndex:20,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},n("Invalid")):null};exports.BoxInfos=BoxInfos,exports.PointCloudValidity=PointCloudValidity,exports.SizeInfoForView=SizeInfoForView;
|
|
@@ -1 +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"),annotation=require("../../hooks/annotation.js"),useStatus=require("./hooks/useStatus.js"),index=require("../../utils/index.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),ctx=require("../../store/ctx.js"),useHistory=require("./hooks/useHistory.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(
|
|
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"),annotation=require("../../hooks/annotation.js"),useStatus=require("./hooks/useStatus.js"),index=require("../../utils/index.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),ctx=require("../../store/ctx.js"),useHistory=require("./hooks/useHistory.js"),useAttribute=require("./hooks/useAttribute.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(s,r,e)=>r in s?__defProp(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e,__spreadValues=(s,r)=>{for(var e in r||(r={}))__hasOwnProp.call(r,e)&&__defNormalProp(s,e,r[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(r))__propIsEnum.call(r,e)&&__defNormalProp(s,e,r[e]);return s},__spreadProps=(s,r)=>__defProps(s,__getOwnPropDescs(r));const{EPolygonPattern}=lbAnnotation.cTool,PointCloudListener=({currentData:s,config:r})=>{const e=React.useContext(PointCloudContext.PointCloudContext),{changeSelectedBoxValid:C,selectNextBox:w,selectPrevBox:m,updateSelectedBox:v}=useSingleBox.useSingleBox(),{clearAllResult:d}=useStatus.useStatus(),g=index.jsonParser(s.result),{copySelectedBoxes:k,pasteSelectedBoxes:B,copiedBoxes:_}=useBoxes.useBoxes(),{toolInstanceRef:n}=annotation.useCustomToolInstance({basicInfo:g}),{updateRotate:p}=useRotate.useRotate({currentData:s}),{updatePointCloudData:b}=usePointCloudViews.usePointCloudViews(),{redo:f,undo:P,pushHistoryWithList:h}=useHistory.useHistory(),{syncThreeViewsAttribute:x,reRenderPointCloud3DBox:A}=useAttribute.useAttribute(),S=(t,o)=>{var c;const{topViewInstance:a,mainViewInstance:i}=e;if(!a)return;const{pointCloud2dOperation:u}=a;switch(t){case"q":{p(2);break}case"e":p(-2);break;case"g":p(180);break;case"u":{const l=u.pattern===EPolygonPattern.Normal?EPolygonPattern.Rect:EPolygonPattern.Normal;u.setPattern(l);const q={[EPolygonPattern.Normal]:"Normal Pattern",[EPolygonPattern.Rect]:"Rect Pattern"};antd.message.success(`Change Pattern to ${q[l]} successfully`),u.clearActiveStatus(),u.clearDrawingStatus()}break;case"+":i==null||i.updatePointSize(!0);break;case"-":i==null||i.updatePointSize(!1);break;case"v":e.setPointCloudValid(!e.valid);break;case"tab":if(o.shiftKey){m();break}w();break;case"f":C();break;default:{if(((c=r.attributeList)==null?void 0:c.length)>0){const l=lbAnnotation.AttributeUtils.getAttributeByKeycode(o.keyCode,r.attributeList);l!==void 0&&n.current.setDefaultAttribute(l)}return}}},j=(t,o)=>{switch(t){case"c":k();break;case"v":B();break;case"a":e.selectedAllBoxes();break;case"z":{o.shiftKey?f():P();break}}},y=t=>{const o=t.key.toLocaleLowerCase();if(t.ctrlKey){j(o,t);return}S(o,t)};return React.useEffect(()=>{const{topViewInstance:t}=e;if(!!t)return window.addEventListener("keydown",y),()=>{window.removeEventListener("keydown",y)}},[e,_,r]),React.useEffect(()=>{b==null||b()},[s,e.mainViewInstance]),React.useEffect(()=>{n.current.exportData=()=>[e.pointCloudBoxList,{valid:e.valid}],n.current.exportCustomData=()=>{var t;return{renderPolygon:(t=e.polygonList)!=null?t:[]}},n.current.setDefaultAttribute=t=>{x(t);const o=e.selectedPointCloudBox;o&&(o.attribute=t,v(o),A(o))},n.current.setSubAttribute=(t,o)=>{var c;const a=e.selectedPointCloudBox;if(a){const i=(c=a==null?void 0:a.subAttribute)!=null?c:{};a.subAttribute=__spreadProps(__spreadValues({},i),{[t]:o}),v(a)}},n.current.clearResult=()=>{d==null||d()},n.current.redo=()=>{f()},n.current.undo=()=>{P()},n.current.setValid=t=>{n.current.valid=t,setTimeout(()=>{e.setPointCloudValid(t),t===!1&&d()})}},[e.pointCloudBoxList,e.selectedID,e.valid,e.polygonList]),React.useEffect(()=>{n.current.history={pushHistory:t=>{h({pointCloudBoxList:t})},initRecord:()=>{}}},[]),React.useEffect(()=>{var t;const o=(t=e.topViewInstance)==null?void 0:t.pointCloud2dOperation;if(!o)return;const c=u=>{x(u)},a=u=>{antd.message.error(u)},i=u=>{antd.message.info(u)};return o.on("syncAttribute",c),o.on("messageError",a),o.on("messageInfo",i),()=>{o.unbind("syncAttribute",c),o.unbind("messageError",a),o.unbind("messageInfo",i)}},[e.topViewInstance]),null};var PointCloudListener$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudListener);module.exports=PointCloudListener$1;
|
|
@@ -1 +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"),index=require("./components/EmptyPage/index.js"),useSize=require("../../hooks/useSize.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,e,r=1)=>{const{width:
|
|
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"),index=require("./components/EmptyPage/index.js"),useSize=require("../../hooks/useSize.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,e,r=1)=>{const{width:l,height:t}=e,o={x:n.x+l*r/2,y:n.y+t*r/2},u={x:e.width/2,y:e.height/2};return{offsetX:(u.x-o.x)/r,offsetY:-(u.y-o.y)/r}},updateSideViewByCanvas2D=(n,e,r,l,t)=>{const{offsetX:o,offsetY:u}=TransferCanvas2WorldOffset(n,r,e);if(t.camera.zoom=e,n){const i=Math.cos(l.rotation),c=Math.sin(l.rotation),s=o*i,a=o*c,{x:d,y:f,z:x}=t.initCameraPosition;t.camera.position.set(d-s,f-a,x+u)}t.camera.updateProjectionMatrix(),t.render()},PointCloudSideView=({config:n})=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),{sideViewUpdateBox:r}=usePointCloudViews.usePointCloudViews(),{selectedBox:l}=useSingleBox.useSingleBox(),t=React.useRef(null),o=useSize(t),{t:u}=reactI18next.useTranslation();return React.useEffect(()=>{if(t.current){const i={width:t.current.clientWidth,height:t.current.clientHeight},c=new lbAnnotation.PointCloudAnnotation({container:t.current,size:i,polygonOperationProps:{showDirectionLine:!1,forbidAddNew:!0},config:n});e.setSideViewInstance(c)}},[]),React.useEffect(()=>{if(!o||!e.sideViewInstance)return;const{pointCloud2dOperation:i,pointCloudInstance:c}=e.sideViewInstance;i.singleOn("renderZoom",(s,a)=>{!e.selectedPointCloudBox||updateSideViewByCanvas2D(a,s,o,e.selectedPointCloudBox,c)}),i.singleOn("dragMove",({currentPos:s,zoom:a})=>{!e.selectedPointCloudBox||updateSideViewByCanvas2D(s,a,o,e.selectedPointCloudBox,c)}),i.singleOn("updatePolygonByDrag",({newPolygon:s,originPolygon:a})=>{r(s,a)})},[e,o]),React.useEffect(()=>{var i;(i=e==null?void 0:e.sideViewInstance)==null||i.initSize(o)},[o]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","side-view"),title:u("SideView"),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}),!l&&React__default.default.createElement(index,null)))};var PointCloudSideView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudSideView);module.exports=PointCloudSideView$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var dom=require("../../utils/dom.js"),index=require("../../views/MainView/toolFooter/index.js"),index$
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),index$1=require("../../views/MainView/toolFooter/index.js"),index$2=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"),useZoom=require("./hooks/useZoom.js"),antd=require("antd"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js"),index=require("../../utils/index.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const{EPolygonPattern}=lbAnnotation.cTool,TransferCanvas2WorldOffset=(t,r,l=1)=>{const{width:a,height:o}=r,i={x:t.x+a*l/2,y:t.y+o*l/2},d={x:r.width/2,y:r.height/2};return{offsetX:(d.x-i.x)/l,offsetY:-(d.y-i.y)/l}},TopViewToolbar=({currentData:t})=>{const{zoom:r,zoomIn:l,zoomOut:a,initialPosition:o}=useZoom.useZoom(),{selectNextBox:i,selectPrevBox:d}=useSingleBox.useSingleBox(),{updateRotate:c}=useRotate.useRotate({currentData:t}),p=2,m=()=>{c(-p)},C=()=>{c(p)},v=()=>{c(180)};return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement("span",{onClick:C,className:dom.getClassName("point-cloud","rotate-reserve")}),React__default.default.createElement("span",{onClick:m,className:dom.getClassName("point-cloud","rotate")}),React__default.default.createElement("span",{onClick:v,className:dom.getClassName("point-cloud","rotate-180")}),React__default.default.createElement(index$1.FooterDivider,null),React__default.default.createElement(icons.UpSquareOutlined,{onClick:()=>{d()},className:dom.getClassName("point-cloud","prev")}),React__default.default.createElement(icons.DownSquareOutlined,{onClick:()=>{i()},className:dom.getClassName("point-cloud","next")}),React__default.default.createElement(index$1.FooterDivider,null),React__default.default.createElement(index$2.ZoomController,{initialPosition:o,zoomIn:l,zoomOut:a,zoom:r}))},ZAxisSlider=({setZAxisLimit:t,zAxisLimit:r})=>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:r,onAfterChange:l=>{t(l)}})),PointCloudTopView=({currentData:t,imgList:r,stepInfo:l})=>{const a=React.useRef(null),o=React__default.default.useContext(PointCloudContext.PointCloudContext),i=useSize(a),d=index.jsonParser(l.config),{setZoom:c}=useZoom.useZoom(),{addPolygon:p,deletePolygon:m}=usePolygon.usePolygon(),{deletePointCloudBox:C,changeBoxValidByID:v}=useSingleBox.useSingleBox(),[x,I]=React.useState(10),{t:V}=reactI18next.useTranslation(),f=usePointCloudViews.usePointCloudViews();return React.useLayoutEffect(()=>{if(!o.topViewInstance&&a.current&&(t==null?void 0:t.url)&&(t==null?void 0:t.result)){const e={width:a.current.clientWidth,height:a.current.clientHeight},s=new lbAnnotation.PointCloudAnnotation({container:a.current,size:e,pcdPath:t.url,config:d});o.setTopViewInstance(s)}},[t]),React.useEffect(()=>{if(!i||!o.topViewInstance||!o.sideViewInstance)return;const{pointCloud2dOperation:e}=o.topViewInstance;e.singleOn("polygonCreated",n=>{if(e.pattern===EPolygonPattern.Normal||!(t==null?void 0:t.url)){p(n),o.setSelectedIDs(n.id);return}f.topViewAddBox({newPolygon:n,size:i,imgList:r,trackConfigurable:d.trackConfigurable})}),e.singleOn("deletedObject",({id:n})=>{C(n),m(n)}),e.singleOn("deleteSelectedIDs",()=>{o.setSelectedIDs([])}),e.singleOn("addSelectedIDs",n=>{o.addSelectedID(n)}),e.singleOn("setSelectedIDs",n=>{o.setSelectedIDs(n)}),e.singleOn("updatePolygonByDrag",({newPolygon:n})=>{var u;(u=f.topViewUpdateBox)==null||u.call(f,n,i)});const s=n=>{v(n)};return e.on("validUpdate",s),()=>{e.unbind("validUpdate",s)}},[o,i,t,f]),React.useEffect(()=>{if(!(i==null?void 0:i.width)||!o.topViewInstance)return;o.topViewInstance.initSize(i),o.topViewInstance.updatePolygonList(o.pointCloudBoxList);const{topViewInstance:{pointCloudInstance:e,pointCloud2dOperation:s}}=o;s.singleOn("renderZoom",(n,u)=>{const{offsetX:g,offsetY:w}=TransferCanvas2WorldOffset(u,i,n);if(e.camera.zoom=n,u){const{x:P,y:h,z:y}=e.initCameraPosition;e.camera.position.set(P+w,h-g,y)}e.camera.updateProjectionMatrix(),e.render(),c(n)}),s.singleOn("dragMove",({currentPos:n,zoom:u})=>{const{offsetX:g,offsetY:w}=TransferCanvas2WorldOffset(n,i,u);e.camera.zoom=u;const{x:P,y:h,z:y}=e.initCameraPosition;e.camera.position.set(P+w,h-g,y),e.render()})},[i,o.topViewInstance]),React.useEffect(()=>{var e,s;(s=(e=o.topViewInstance)==null?void 0:e.pointCloudInstance)==null||s.applyZAxisPoints(x)},[x]),React.useEffect(()=>{f.topViewSelectedChanged()},[o.selectedIDs]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","top-view"),title:V("TopView"),toolbar:React__default.default.createElement(TopViewToolbar,{currentData:t})},React__default.default.createElement("div",{style:{position:"relative",flex:1}},React__default.default.createElement("div",{style:{width:"100%",height:"100%"},ref:a}),React__default.default.createElement(PointCloudInfos.BoxInfos,null),React__default.default.createElement(ZAxisSlider,{zAxisLimit:x,setZAxisLimit:I}),React__default.default.createElement(PointCloudInfos.PointCloudValidity,null)))};var PointCloudTopView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudTopView);module.exports=PointCloudTopView$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js");const useAttribute=()=>{var o,n;const{topViewInstance:t,sideViewInstance:u,backViewInstance:i,mainViewInstance:r}=React.useContext(PointCloudContext.PointCloudContext),[d,a]=React.useState((n=(o=t==null?void 0:t.pointCloud2dOperation)==null?void 0:o.defaultAttribute)!=null?n:"");return React.useEffect(()=>{if(!(t==null?void 0:t.pointCloud2dOperation))return;const e=()=>{a(t==null?void 0:t.pointCloud2dOperation.defaultAttribute)};return t==null||t.pointCloud2dOperation.on("changeAttributeSidebar",e),()=>{t==null||t.pointCloud2dOperation.unbind("changeAttributeSidebar",e)}},[t==null?void 0:t.pointCloud2dOperation]),{syncThreeViewsAttribute:e=>{[t==null?void 0:t.pointCloud2dOperation,u==null?void 0:u.pointCloud2dOperation,i==null?void 0:i.pointCloud2dOperation].forEach(l=>{l==null||l.setDefaultAttribute(e)})},updateDefaultAttribute:e=>{t==null||t.pointCloud2dOperation.setDefaultAttribute(e)},reRenderPointCloud3DBox:e=>{r==null||r.generateBox(e)},defaultAttribute:d}};exports.useAttribute=useAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(i,e,r)=>e in i?__defProp(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,__spreadValues=(i,e)=>{for(var r in e||(e={}))__hasOwnProp.call(e,r)&&__defNormalProp(i,r,e[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(e))__propIsEnum.call(e,r)&&__defNormalProp(i,r,e[r]);return i};const useHistory=()=>{const{history:i,setPointCloudResult:e,setSelectedIDs:r,pointCloudBoxList:s,mainViewInstance:u,topViewInstance:p,polygonList:l,setPolygonList:f}=React.useContext(PointCloudContext.PointCloudContext),a=({newBoxParams:t,newPolygon:o})=>{const n={pointCloudBoxList:s,polygonList:l};t&&(n.pointCloudBoxList=s.concat(t)),o&&(n.polygonList=l.concat(o)),i.pushHistory(n)},L=t=>{const o={pointCloudBoxList:s,polygonList:l};t.pointCloudBoxList&&(o.pointCloudBoxList=t.pointCloudBoxList),t.polygonList&&(o.polygonList=t.polygonList),i.pushHistory(o)},C=t=>{l.find(n=>n.id===t.id)&&i.pushHistory({pointCloudBoxList:s,polygonList:l.map(n=>n.id===t.id?t:__spreadValues({},n))})},P=({pointCloudBoxList:t,polygonList:o})=>{i.initRecord([{pointCloudBoxList:t,polygonList:o}],!0)},y=t=>{if(!t)return;const{pointCloudBoxList:o,polygonList:n}=t;if(o){s.length!==o.length&&r();const g=s.filter(d=>o.findIndex(c=>c.id===d.id)>=0),x=o.filter(d=>s.findIndex(c=>c.id!==d.id)>=0);g.forEach(d=>{u==null||u.removeObjectByName(d.id)}),x.forEach(d=>{u==null||u.generateBox(d)}),e(o)}n&&f(n),p==null||p.updatePolygonList(o!=null?o:[],n!=null?n:[])};return{addHistory:a,pushHistoryWithList:L,initHistory:P,pushHistoryUnderUpdatePolygon:C,redo:()=>{y(i.redo())},undo:()=>{y(i.undo())}}};exports.useHistory=useHistory;
|
|
@@ -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"),_=require("lodash"),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");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,o,i)=>o in t?__defProp(t,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[o]=i,__spreadValues=(t,o)=>{for(var i in o||(o={}))__hasOwnProp.call(o,i)&&__defNormalProp(t,i,o[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(o))__propIsEnum.call(o,i)&&__defNormalProp(t,i,o[i]);return t},__spreadProps=(t,o)=>__defProps(t,__getOwnPropDescs(o)),__async=(t,o,i)=>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"),_=require("lodash"),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");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,o,i)=>o in t?__defProp(t,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[o]=i,__spreadValues=(t,o)=>{for(var i in o||(o={}))__hasOwnProp.call(o,i)&&__defNormalProp(t,i,o[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(o))__propIsEnum.call(o,i)&&__defNormalProp(t,i,o[i]);return t},__spreadProps=(t,o)=>__defProps(t,__getOwnPropDescs(o)),__async=(t,o,i)=>new Promise((a,e)=>{var n=s=>{try{u(i.next(s))}catch(P){e(P)}},g=s=>{try{u(i.throw(s))}catch(P){e(P)}},u=s=>s.done?a(s.value):Promise.resolve(s.value).then(n,g);u((i=i.apply(t,o)).next())});const DEFAULT_SCOPE=5,DEFAULT_RADIUS=90,PointCloudView={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},transferCanvas2World=(t,o)=>{const{width:i,height:a}=o,{x:e,y:n}=t;return{x:-n+a/2,y:-(e-i/2)}},topViewPolygon2PointCloud=(t,o,i,a,e)=>{const[n,g,u,s]=t.pointList.map(f=>transferCanvas2World(f,o)),P=lbAnnotation.MathUtils.getLineCenterPoint([n,u]),h=lbAnnotation.MathUtils.getLineLength(n,g),w=lbAnnotation.MathUtils.getLineLength(g,u),I=lbAnnotation.MathUtils.getRadiusFromQuadrangle(t.pointList);let y=0,p=1,C={};if(i){const f=i.getSensesPointZAxisInPolygon([n,g,u,s]);y=(f.maxZ+f.minZ)/2,p=f.maxZ-f.minZ,C={count:f.zCount}}a&&(y=a.center.z,p=a.depth);const D={center:{x:P.x,y:P.y,z:y},width:w,height:h,depth:p,rotation:I,id:t.id},x=__spreadValues(a?__spreadValues(__spreadValues({},a),D):__spreadProps(__spreadValues({},D),{attribute:"",valid:!0}),C);return e&&Object.assign(x,e),x},sideViewPolygon2PointCloud=(t,o,i,a)=>{const[e,n,g]=t.pointList,[u,s,P]=o.pointList,h=lbAnnotation.MathUtils.getLineCenterPoint([e,g]),w=lbAnnotation.MathUtils.getLineCenterPoint([u,P]),y={x:{x:h.x-w.x,y:h.y-w.y}.x,y:0,z:h.y-w.y},p=lbAnnotation.MathUtils.getLineLength(e,n),C=lbAnnotation.MathUtils.getLineLength(u,s),D=p-C,x=lbAnnotation.MathUtils.getLineLength(n,g),f=lbAnnotation.MathUtils.getLineLength(s,P),L=x-f,{newBoxParams:V}=a.getNewBoxBySideUpdate(y,L,D,i);return V},synchronizeSideView=(t,o,i,a)=>{if(!i)return;const{pointCloud2dOperation:e,pointCloudInstance:n}=i;n.loadPCDFileByBox(a,t,{width:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:g}=n.updateOrthoCamera(t,lbUtils.EPerspectiveView.Left);n.setInitCameraPosition(g);const{polygon2d:u,zoom:s}=n.getBoxSidePolygon2DCoordinate(t);n.camera.zoom=s,n.camera.updateProjectionMatrix(),n.render(),e.initPosition(),e.zoomChangeOnCenter(s),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:u,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},synchronizeBackView=(t,o,i,a)=>{if(!i)return;const{pointCloud2dOperation:e,pointCloudInstance:n}=i;n.loadPCDFileByBox(a,t,{height:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:g}=n.updateOrthoCamera(t,lbUtils.EPerspectiveView.Back);n.setInitCameraPosition(g);const{polygon2d:u,zoom:s}=n.getBoxBackPolygon2DCoordinate(t);n.camera.zoom=s,n.camera.updateProjectionMatrix(),n.render(),e.initPosition(),e.zoomChangeOnCenter(s),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:u,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},synchronizeTopView=(t,o,i,a)=>{var e;if(!i||!a)return;a.generateBox(t,o.id),a.updateCameraByBox(t,lbUtils.EPerspectiveView.Top),a.render();const{pointCloud2dOperation:n,pointCloudInstance:g}=i,{polygon2d:u}=g.getBoxTopPolygon2DCoordinate(t),s=[...n.polygonList],P=s.find(h=>h.id===o.id);P?P.pointList=u:s.push({id:o.id,pointList:u,textAttribute:"",isRect:!0,valid:(e=t.valid)!=null?e:!0}),n.setResultAndSelectedID(s,o.id)},usePointCloudViews=()=>{const t=React.useContext(PointCloudContext.PointCloudContext),{topViewInstance:o,sideViewInstance:i,backViewInstance:a,mainViewInstance:e,addPointCloudBox:n,setSelectedIDs:g,selectedIDs:u,pointCloudBoxList:s}=t,{addHistory:P,initHistory:h,pushHistoryUnderUpdatePolygon:w}=useHistory.useHistory(),{selectedPolygon:I}=usePolygon.usePolygon(),{updateSelectedBox:y}=useSingleBox.useSingleBox(),{currentData:p,config:C}=ctx.useSelector(r=>{const{stepList:l,step:c,imgList:d,imgIndex:v}=r.annotation;return{currentData:d[v],config:index.jsonParser(StepUtils.getCurrentStepInfo(c,l).config)}}),D=ctx.useDispatch(),{selectedBox:x}=useSingleBox.useSingleBox(),{t:f}=reactI18next.useTranslation(),L=x==null?void 0:x.info;if(!o||!i)return{topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{}};const{pointCloudInstance:V}=o,z=r=>{e==null||e.generateBox(r),e==null||e.controls.update(),e==null||e.render()},A=({newPolygon:r,size:l,imgList:c,trackConfigurable:d})=>{var v;const O=c,S={attribute:(v=o.pointCloud2dOperation.defaultAttribute)!=null?v:""};d===!0&&Object.assign(S,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:O,extraBoxList:s})});const B=topViewPolygon2PointCloud(r,l,V,void 0,S),b=o==null?void 0:o.pointCloud2dOperation,m=B;if((C==null?void 0:C.lowerLimitPointsNumInBox)&&typeof B.count=="number"&&B.count<C.lowerLimitPointsNumInBox){antd.message.info(f("LowerLimitPointsNumInBox",{num:C.lowerLimitPointsNumInBox})),b.deletePolygon(B.id);return}b.setSelectedIDs([r.id]),g(m.id),U(PointCloudView.Top,r,m),n(m),P({newBoxParams:m})},T=()=>{const r=x==null?void 0:x.info,l=o==null?void 0:o.pointCloud2dOperation;if(l.setSelectedIDs(u),!r||!l)return;const c=l.selectedPolygon;U(PointCloudView.Top,c,r)},j=(r,l,c)=>{if(L){let d=sideViewPolygon2PointCloud(r,l,L,i.pointCloudInstance);if(e){const{count:v}=e.getSensesPointZAxisInPolygon(lbAnnotation.getCuboidFromPointCloudBox(d).polygonPointList,[d.center.z-d.depth/2,d.center.z+d.depth/2]);d=__spreadProps(__spreadValues({},d),{count:v})}y(d),U(c,r,d)}},k=(r,l)=>{j(r,l,PointCloudView.Side)},q=(r,l)=>{j(r,l,PointCloudView.Back)},R=(r,l)=>{if(I){w(r);return}if(L){const c=topViewPolygon2PointCloud(r,l,o.pointCloudInstance,L);Object.assign(L,___default.default.pickBy(c,(d,v)=>["width","height","x","y"])),y(c),U(PointCloudView.Top,r,L)}},U=(r,l,c)=>{const d=p==null?void 0:p.url,v={[PointCloudView.Side]:()=>{synchronizeSideView(c,l,i,d)},[PointCloudView.Back]:()=>{a&&synchronizeBackView(c,l,a,d)},[PointCloudView.Top]:()=>{synchronizeTopView(c,l,o,e)}};Object.keys(v).forEach(O=>{O!==r&&v[O]()}),z(c),e==null||e.highlightOriginPointCloud(c)};return{topViewAddBox:A,topViewSelectedChanged:T,topViewUpdateBox:R,sideViewUpdateBox:k,backViewUpdateBox:q,pointCloudBoxListUpdated:r=>{o.updatePolygonList(r),e==null||e.generateBoxes(r)},initPointCloud3d:()=>{!e||(e.initPerspectiveCamera(),e.initRenderer(),e.render())},updatePointCloudData:()=>__async(void 0,null,function*(){var r,l,c,d,v,O;if(!(p==null?void 0:p.url)||!e)return;actionCreators.SetPointCloudLoading(D,!0),yield e.loadPCDFile(p.url,(r=C==null?void 0:C.radius)!=null?r:DEFAULT_RADIUS),s.forEach(m=>{e==null||e.removeObjectByName(m.id)});let S=[],B=[];p.result?(S=lbUtils.PointCloudUtils.getBoxParamsFromResultList(p.result),B=lbUtils.PointCloudUtils.getPolygonListFromResultList(p.result),S.forEach(m=>{e==null||e.generateBox(m)}),t.setPointCloudResult(S),t.setPolygonList(B)):(t.setPointCloudResult([]),t.setPolygonList([])),h({pointCloudBoxList:S,polygonList:B}),e.updateTopCamera();const b=(c=(l=index.jsonParser(p.result))==null?void 0:l.valid)!=null?c:!0;t.setPointCloudValid(b),(d=t.sideViewInstance)==null||d.clearAllData(),(v=t.backViewInstance)==null||v.clearAllData(),o.updateData(p.url,p.result,{radius:(O=C==null?void 0:C.radius)!=null?O:DEFAULT_RADIUS}),actionCreators.SetPointCloudLoading(D,!1)})}};exports.synchronizeBackView=synchronizeBackView,exports.synchronizeSideView=synchronizeSideView,exports.synchronizeTopView=synchronizeTopView,exports.topViewPolygon2PointCloud=topViewPolygon2PointCloud,exports.transferCanvas2World=transferCanvas2World,exports.usePointCloudViews=usePointCloudViews;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),dom=require("../../../../utils/dom.js"),icons=require("@ant-design/icons"),index=require("../../index.js"),Pagination=require("../../../../views/MainView/toolFooter/Pagination.js"),icon_keyboard_h=require("../../../../assets/annotation/video/icon_keyboard_h.svg.js"),index$1=require("../../../../views/MainView/toolFooter/FooterTips/ToolHotKey/index.js"),reactI18next=require("react-i18next"),utils=require("../../utils.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{EVideoToolName}=lbAnnotation.cTool,videoTimeFormat=e=>{const t=Math.floor(e/60),a=~~(e%60).toFixed(),o=(e*10).toString().split("").pop(),l=r=>r<10?`0${r}`:r;return`${l(t)}:${l(a)}:${o}`},VideoProgress=()=>{const{currentTime:e,duration:t,buffered:a,setCurrentTime:o}=React__default.default.useContext(index.VideoPlayerCtx),l=React__default.default.useRef(null),r=`${utils.decimalReserved(a/t*100,1)}%`,n=`${utils.decimalReserved(e/t*100,1)}%`,i=s=>{if(l.current){const d=s.clientX,c=l.current.clientWidth,u=utils.decimalReserved(d/c*t,1);o(u)}};return React__default.default.createElement("div",{className:dom.getClassName("video-progress"),ref:l,onClick:s=>{s.stopPropagation(),s.nativeEvent.stopImmediatePropagation(),i(s)}},React__default.default.createElement("div",{className:dom.getClassName("video-slider")},React__default.default.createElement("div",{className:dom.getClassName("video-slider","played"),style:{width:n}}),React__default.default.createElement("div",{className:dom.getClassName("video-slider","loaded"),style:{width:r}}),React__default.default.createElement("div",{className:dom.getClassName("video-slider","played"),style:{width:n}})),React__default.default.createElement("div",{className:dom.getClassName("video-slider-bar"),style:{left:n}}))},VideoSpeedButton=()=>{const{updateNextPlaybackRate:e,playbackRate:t}=React__default.default.useContext(index.VideoPlayerCtx),{t:a}=reactI18next.useTranslation();return React__default.default.createElement("span",{className:dom.getClassName("video-controller","speed")},React__default.default.createElement("span",null,a("Speed")),React__default.default.createElement("span",{className:dom.getClassName("video-controller","speedNum")},`${t}x`),React__default.default.createElement("span",{className:dom.getClassName("video-controller","speedButton")},React__default.default.createElement(icons.CaretUpOutlined,{onClick:()=>{e()}}),React__default.default.createElement(icons.CaretDownOutlined,{onClick:()=>{e(!1)}})))},VideoHotKeys=()=>{const{t:e}=reactI18next.useTranslation();return React__default.default.createElement(index$1,{title:React__default.default.createElement("span",{className:dom.getClassName("video-controller","hotkey")},React__default.default.createElement("img",{src:icon_keyboard_h}),e("Hotkeys")),style:{},toolName:EVideoToolName.VideoTagTool})},VideoPageChange=()=>{const{imgIndex:e,imgList:t,pageBackward:a,pageJump:o,pageForward:l}=React__default.default.useContext(index.VideoPlayerCtx);return React__default.default.createElement(Pagination.Pagination,{isVideo:!0,pageBackward:a,imgIndex:e,pageJump:o,totalPage:t.length,pageForward:l,footerCls:dom.getClassName("video-controller")})},VideoTime=()=>{const{currentTime:e,duration:t}=React__default.default.useContext(index.VideoPlayerCtx),a=t*10-e*10,o=(a>0?a:0)/10;return React__default.default.createElement("div",{className:dom.getClassName("video-controller","time")},`${videoTimeFormat(e)} / -${videoTimeFormat(o)}`)},VideoController=()=>{const{playPause:e,isPlay:t}=React__default.default.useContext(index.VideoPlayerCtx);return React__default.default.createElement("div",{className:dom.getClassName("video-controller","wrapper")},React__default.default.createElement(VideoProgress,null),React__default.default.createElement("div",{className:dom.getClassName("video-controller")},React__default.default.createElement("span",{onClick:()=>{e()},className:dom.getClassName("video-controller","playButton")},t?React__default.default.createElement(icons.PauseOutlined,null):React__default.default.createElement(icons.CaretRightOutlined,null)),React__default.default.createElement(VideoTime,null),React__default.default.createElement(VideoSpeedButton,null),React__default.default.createElement("div",{className:dom.getClassName("video-controller","holder")}),React__default.default.createElement(VideoPageChange,null),React__default.default.createElement(VideoHotKeys,null)))};module.exports=VideoController;
|
|
1
|
+
"use strict";var React=require("react"),dom=require("../../../../utils/dom.js"),icons=require("@ant-design/icons"),index=require("../../index.js"),Pagination=require("../../../../views/MainView/toolFooter/Pagination.js"),icon_keyboard_h=require("../../../../assets/annotation/video/icon_keyboard_h.svg.js"),index$1=require("../../../../views/MainView/toolFooter/FooterTips/ToolHotKey/index.js"),reactI18next=require("react-i18next"),utils=require("../../utils.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{EVideoToolName}=lbAnnotation.cTool,videoTimeFormat=e=>{const t=Math.floor(e/60),a=~~(e%60).toFixed(),o=(e*10).toString().split("").pop(),l=r=>r<10?`0${r}`:r;return`${l(t)}:${l(a)}:${o}`},VideoProgress=()=>{const{currentTime:e,duration:t,buffered:a,setCurrentTime:o}=React__default.default.useContext(index.VideoPlayerCtx),l=React__default.default.useRef(null),r=`${utils.decimalReserved(a/t*100,1)}%`,n=`${utils.decimalReserved(e/t*100,1)}%`,i=s=>{if(l.current){const d=s.clientX,c=l.current.clientWidth,u=utils.decimalReserved(d/c*t,1);o(u)}};return React__default.default.createElement("div",{className:dom.getClassName("video-progress"),ref:l,onClick:s=>{s.stopPropagation(),s.nativeEvent.stopImmediatePropagation(),i(s)}},React__default.default.createElement("div",{className:dom.getClassName("video-slider")},React__default.default.createElement("div",{className:dom.getClassName("video-slider","played"),style:{width:n}}),React__default.default.createElement("div",{className:dom.getClassName("video-slider","loaded"),style:{width:r}}),React__default.default.createElement("div",{className:dom.getClassName("video-slider","played"),style:{width:n}})),React__default.default.createElement("div",{className:dom.getClassName("video-slider-bar"),style:{left:n}}))},VideoSpeedButton=()=>{const{updateNextPlaybackRate:e,playbackRate:t}=React__default.default.useContext(index.VideoPlayerCtx),{t:a}=reactI18next.useTranslation();return React__default.default.createElement("span",{className:dom.getClassName("video-controller","speed")},React__default.default.createElement("span",null,a("Speed")),React__default.default.createElement("span",{className:dom.getClassName("video-controller","speedNum")},`${t}x`),React__default.default.createElement("span",{className:dom.getClassName("video-controller","speedButton")},React__default.default.createElement(icons.CaretUpOutlined,{onClick:()=>{e()}}),React__default.default.createElement(icons.CaretDownOutlined,{onClick:()=>{e(!1)}})))},VideoHotKeys=()=>{const{t:e}=reactI18next.useTranslation();return React__default.default.createElement(index$1.default,{title:React__default.default.createElement("span",{className:dom.getClassName("video-controller","hotkey")},React__default.default.createElement("img",{src:icon_keyboard_h}),e("Hotkeys")),style:{},toolName:EVideoToolName.VideoTagTool})},VideoPageChange=()=>{const{imgIndex:e,imgList:t,pageBackward:a,pageJump:o,pageForward:l}=React__default.default.useContext(index.VideoPlayerCtx);return React__default.default.createElement(Pagination.Pagination,{isVideo:!0,pageBackward:a,imgIndex:e,pageJump:o,totalPage:t.length,pageForward:l,footerCls:dom.getClassName("video-controller")})},VideoTime=()=>{const{currentTime:e,duration:t}=React__default.default.useContext(index.VideoPlayerCtx),a=t*10-e*10,o=(a>0?a:0)/10;return React__default.default.createElement("div",{className:dom.getClassName("video-controller","time")},`${videoTimeFormat(e)} / -${videoTimeFormat(o)}`)},VideoController=()=>{const{playPause:e,isPlay:t}=React__default.default.useContext(index.VideoPlayerCtx);return React__default.default.createElement("div",{className:dom.getClassName("video-controller","wrapper")},React__default.default.createElement(VideoProgress,null),React__default.default.createElement("div",{className:dom.getClassName("video-controller")},React__default.default.createElement("span",{onClick:()=>{e()},className:dom.getClassName("video-controller","playButton")},t?React__default.default.createElement(icons.PauseOutlined,null):React__default.default.createElement(icons.CaretRightOutlined,null)),React__default.default.createElement(VideoTime,null),React__default.default.createElement(VideoSpeedButton,null),React__default.default.createElement("div",{className:dom.getClassName("video-controller","holder")}),React__default.default.createElement(VideoPageChange,null),React__default.default.createElement(VideoHotKeys,null)))};module.exports=VideoController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const styleString='{"toolColor":{"1":{"valid":{"stroke":"rgba(0,0,255,0.50)","fill":"rgba(0,0,255,0.
|
|
1
|
+
"use strict";const styleString='{"color":1,"width":2,"borderOpacity":9,"fillOpacity":9,"toolColor":{"1":{"valid":{"stroke":"rgba(0,0,255,0.50)","fill":"rgba(0,0,255,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(0,15,255,1.00)","fill":"rgba(0,15,255,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(0,15,255,0.80)","fill":"rgba(0,15,255,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}},"3":{"valid":{"stroke":"rgba(0,255,255,0.50)","fill":"rgba(0,255,255,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(0,212,255,1.00)","fill":"rgba(0,212,255,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(0,212,255,0.80)","fill":"rgba(0,212,255,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}},"5":{"valid":{"stroke":"rgba(0,255,0,0.50)","fill":"rgba(0,255,0,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(149,255,1.00)","fill":"rgba(149,255,0,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(149,255,0,0.80)","fill":"rgba(149,255,0,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}},"7":{"valid":{"stroke":"rgba(255,255,0,0.50)","fill":"rgba(255,255,0,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(255,230,102,1.00)","fill":"rgba(255,213,0,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(255,230,102,0.80)","fill":"rgba(255,230,102,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}},"9":{"valid":{"stroke":"rgba(255,0,255,0.50)","fill":"rgba(255,0,255,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(230,102,255,1.00)","fill":"rgba(213,0,255,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(230,102,255,0.80)","fill":"rgba(230,102,255,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}}},"attributeColor":[{"valid":{"stroke":"rgba(204,204,204,1.00)","fill":"rgba(204,204,204,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(204,204,204,1.00)","fill":"rgba(204,204,204,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(204,204,204,1.00)","fill":"rgba(204,204,204,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(128,12,249,1.00)","fill":"rgba(128,12,249,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(128,12,249,1.00)","fill":"rgba(128,12,249,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(128,12,249,1.00)","fill":"rgba(128,12,249,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(0,255,48,1.00)","fill":"rgba(0,255,48,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(0,255,48,1.00)","fill":"rgba(0,255,48,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(0,255,48,1.00)","fill":"rgba(0,255,48,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(255,136,247,1.00)","fill":"rgba(255,136,247,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(255,136,247,1.00)","fill":"rgba(255,136,247,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(255,136,247,1.00)","fill":"rgba(255,136,247,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(255,226,50,1.00)","fill":"rgba(255,226,50,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(255,226,50,1.00)","fill":"rgba(255,226,50,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(255,226,50,1.00)","fill":"rgba(255,226,50,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(153,66,23,1.00)","fill":"rgba(153,66,23,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(153,66,23,1.00)","fill":"rgba(153,66,23,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(153,66,23,1.00)","fill":"rgba(153,66,23,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(2,130,250,1.00)","fill":"rgba(2,130,250,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(2,130,250,1.00)","fill":"rgba(2,130,250,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(2,130,250,1.00)","fill":"rgba(2,130,250,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(255,35,35,1.00)","fill":"rgba(255,35,35,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(255,35,35,1.00)","fill":"rgba(255,35,35,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(255,35,35,1.00)","fill":"rgba(255,35,35,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(0,255,234,1.00)","fill":"rgba(0,255,234,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(0,255,234,1.00)","fill":"rgba(0,255,234,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(0,255,234,1.00)","fill":"rgba(0,255,234,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}}],"lineColor":{"1":"rgba(102, 111, 255, 1 )","3":"rgba(102, 230, 255, 1)","5":"rgba(191, 255, 102, 1)","7":"rgba(255, 230, 102, 1)","9":"rgba(230, 102, 255, 1)"},"attributeLineColor":["rgba(204, 204, 204, 1)","rgba(128, 12, 249, 1)","rgba(0, 255, 48, 1)","rgba(255, 136, 247, 1)","rgba(255, 226, 50, 1)","rgba(153, 66, 23, 1)","rgba(2, 130, 250, 1)","rgba(255, 35, 35, 1)","rgba(0, 255, 234, 1)"]}';module.exports=styleString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var StepUtils=require("../../utils/StepUtils.js"),index=require("../../utils/index.js");const a2MapStateToProps=t=>{var n,o,r;const{annotation:{imgList:i,imgIndex:s}}=t,a=(n=i[s])!=null?n:{},e=StepUtils.getCurrentStepInfo((o=t.annotation)==null?void 0:o.step,(r=t.annotation)==null?void 0:r.stepList);return{currentData:a,imgList:i,stepInfo:e,config:index.jsonParser(e==null?void 0:e.config)}};exports.a2MapStateToProps=a2MapStateToProps;
|
|
@@ -6,12 +6,13 @@ interface IProps {
|
|
|
6
6
|
value: string;
|
|
7
7
|
color?: string;
|
|
8
8
|
}>;
|
|
9
|
-
selectedAttribute
|
|
9
|
+
selectedAttribute?: string;
|
|
10
10
|
attributeChanged: (v: string) => void;
|
|
11
11
|
forbidDefault?: boolean;
|
|
12
12
|
forbidColor?: boolean;
|
|
13
13
|
noHeightLimit?: boolean;
|
|
14
|
-
num?: number;
|
|
14
|
+
num?: number | string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
15
16
|
}
|
|
16
17
|
declare const AttributeList: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
|
|
17
18
|
export default AttributeList;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
imgInfo: IFileItem;
|
|
4
|
-
}
|
|
5
|
-
declare const _default: import("react-redux").ConnectedComponent<({ imgInfo }: IProps) => JSX.Element, import("react-redux").Omit<IProps, "imgInfo">>;
|
|
1
|
+
import { IA2MapStateProps } from '@/store/annotation/map';
|
|
2
|
+
declare const _default: import("react-redux").ConnectedComponent<({ currentData, config }: IA2MapStateProps) => JSX.Element, import("react-redux").Omit<IA2MapStateProps, "imgList" | "config" | "currentData" | "stepInfo">>;
|
|
6
3
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: import("react-redux").ConnectedComponent<React.FC<
|
|
2
|
+
import { IA2MapStateProps } from '@/store/annotation/map';
|
|
3
|
+
declare const _default: import("react-redux").ConnectedComponent<React.FC<IA2MapStateProps>, import("react-redux").Omit<IA2MapStateProps & {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
}, "currentData">>;
|
|
5
|
+
}, "imgList" | "config" | "currentData" | "stepInfo">>;
|
|
6
6
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: import("react-redux").ConnectedComponent<({ currentData }:
|
|
1
|
+
import { IA2MapStateProps } from '@/store/annotation/map';
|
|
2
|
+
declare const _default: import("react-redux").ConnectedComponent<({ currentData, config }: IA2MapStateProps) => JSX.Element, import("react-redux").Omit<IA2MapStateProps, "imgList" | "config" | "currentData" | "stepInfo">>;
|
|
3
3
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: import("react-redux").ConnectedComponent<React.FC<
|
|
2
|
+
import { IA2MapStateProps } from '@/store/annotation/map';
|
|
3
|
+
declare const _default: import("react-redux").ConnectedComponent<React.FC<IA2MapStateProps>, import("react-redux").Omit<IA2MapStateProps & {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
}, "currentData">>;
|
|
5
|
+
}, "imgList" | "config" | "currentData" | "stepInfo">>;
|
|
6
6
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: import("react-redux").ConnectedComponent<React.FC<
|
|
2
|
+
import { IA2MapStateProps } from '@/store/annotation/map';
|
|
3
|
+
declare const _default: import("react-redux").ConnectedComponent<React.FC<IA2MapStateProps>, import("react-redux").Omit<IA2MapStateProps & {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
}, "currentData">>;
|
|
5
|
+
}, "imgList" | "config" | "currentData" | "stepInfo">>;
|
|
6
6
|
export default _default;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { IA2MapStateProps } from '@/store/annotation/map';
|
|
3
3
|
declare const _default: import("react-redux").ConnectedComponent<React.FC<IA2MapStateProps>, import("react-redux").Omit<IA2MapStateProps & {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
}, "imgList" | "currentData">>;
|
|
5
|
+
}, "imgList" | "config" | "currentData" | "stepInfo">>;
|
|
6
6
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IPointCloudBox } from '@labelbee/lb-utils';
|
|
2
|
+
export declare const useAttribute: () => {
|
|
3
|
+
syncThreeViewsAttribute: (attribute?: string | undefined) => void;
|
|
4
|
+
updateDefaultAttribute: (attribute?: string | undefined) => void;
|
|
5
|
+
reRenderPointCloud3DBox: (newBox: IPointCloudBox) => void;
|
|
6
|
+
defaultAttribute: string;
|
|
7
|
+
};
|
|
@@ -51,10 +51,11 @@ export declare const usePointCloudViews: () => {
|
|
|
51
51
|
initPointCloud3d?: undefined;
|
|
52
52
|
updatePointCloudData?: undefined;
|
|
53
53
|
} | {
|
|
54
|
-
topViewAddBox: ({ newPolygon, size, imgList, }: {
|
|
54
|
+
topViewAddBox: ({ newPolygon, size, imgList, trackConfigurable, }: {
|
|
55
55
|
newPolygon: any;
|
|
56
56
|
size: ISize;
|
|
57
57
|
imgList: IFileItem[];
|
|
58
|
+
trackConfigurable?: boolean | undefined;
|
|
58
59
|
}) => void;
|
|
59
60
|
topViewSelectedChanged: () => void;
|
|
60
61
|
topViewUpdateBox: (polygon: any, size: ISize) => void;
|