@labelbee/lb-components 1.8.0 → 1.9.0-alpha.1
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/assets/icons/bcc2b407.svg +11 -0
- 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/PointCloudContext.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/useBoxes.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/index.css +52 -3
- package/dist/store/annotation/selectors.js +1 -0
- package/dist/types/components/AnnotationView/index.d.ts +1 -1
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +8 -1
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +3 -16
- package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +4 -1
- package/dist/types/components/videoPlayer/types.d.ts +1 -1
- package/dist/types/store/annotation/selectors.d.ts +7 -0
- package/dist/types/store/annotation/types.d.ts +3 -3
- package/dist/types/store/imgAttribute/types.d.ts +1 -1
- package/dist/types/store/index.d.ts +1 -1
- package/dist/types/store/toolStyle/types.d.ts +1 -1
- package/dist/types/utils/dom.d.ts +2 -2
- package/dist/types/views/MainView/toolFooter/AnnotatedAttributes/index.d.ts +4 -0
- package/dist/types/views/MainView/toolFooter/FooterPopover.d.ts +10 -0
- package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
- package/dist/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterPopover.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/dist/views/MainView/toolFooter/index.js +1 -1
- package/es/assets/annotation/rectTool/icon_rectPattern.svg.js +1 -4
- package/es/components/ImageError/index.js +1 -53
- 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/PointCloudContext.js +1 -1
- package/es/components/pointCloudView/PointCloudContext.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/useBoxes.js +1 -1
- package/es/components/pointCloudView/hooks/useBoxes.js.map +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudBoxes.js +119 -0
- package/es/components/pointCloudView/hooks/usePointCloudBoxes.js.map +1 -0
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js.map +1 -1
- package/es/components/pointCloudView/hooks/usePolygon.js.map +1 -1
- package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
- package/es/components/pointCloudView/hooks/useSingleBox.js.map +1 -1
- package/es/components/pointCloudView/hooks/useStatus.js +1 -1
- package/es/components/pointCloudView/hooks/useStatus.js.map +1 -1
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/pointCloudView/index.js.map +1 -1
- package/es/components/pointCloudView/useSingleBox.js +44 -0
- package/es/components/pointCloudView/useSingleBox.js.map +1 -0
- package/es/index.css +52 -3
- package/es/store/annotation/selectors.js +1 -0
- package/es/store/annotation/selectors.js.map +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/OperationList.js +77 -0
- package/es/views/MainView/sidebar/GeneralOperation/OperationList.js.map +1 -0
- package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -0
- package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterPopover.js +1 -0
- package/es/views/MainView/toolFooter/FooterPopover.js.map +1 -0
- 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/index.js +1 -1
- package/es/views/MainView/toolFooter/index.js.map +1 -1
- package/package.json +4 -4
- package/es/assets/annotation/toolHotKeyIcon/icon_copyBackwardResult.svg.js +0 -4
- package/es/assets/annotation/toolHotKeyIcon/icon_copyBackwardResult.svg.js.map +0 -1
- package/es/assets/cssIcon/annotation/icon_clearSmall.svg +0 -10
- package/es/assets/cssIcon/annotation/icon_clearSmall_a.svg +0 -10
- package/es/assets/cssIcon/slide_btn.svg +0 -23
- package/es/components/pointCloudView/components/UnifiedParamsModal/index.js +0 -228
- package/es/components/pointCloudView/components/UnifiedParamsModal/index.js.map +0 -1
- package/es/components/pointCloudView/data.js +0 -4
- package/es/components/pointCloudView/data.js.map +0 -1
- package/es/hooks/useConfig.js +0 -18
- package/es/hooks/useConfig.js.map +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="36" height="36" rx="4" fill="#444444"/>
|
|
3
|
+
<path d="M18 26.6C22.7497 26.6 26.6 22.7497 26.6 18C26.6 13.2503 22.7497 9.4 18 9.4C13.2503 9.4 9.4 13.2503 9.4 18C9.4 22.7497 13.2503 26.6 18 26.6Z" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M18 9V6" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M18 30V27" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path d="M30 18H27" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
<path d="M9 18H6" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
<path d="M18 21C19.6569 21 21 19.6569 21 18C21 16.3431 19.6569 15 18 15C16.3431 15 15 16.3431 15 18C15 19.6569 16.3431 21 18 21Z" fill="white"/>
|
|
9
|
+
<path d="M21.9674 23.5663C21.6434 24.7157 21.1189 25.8574 20.5171 26.6057C20.6329 26.7831 20.8103 27.1689 20.872 27.3386C21.0417 27.1226 21.196 26.8834 21.358 26.6211V30.6017H22.0291V25.3097C22.2529 24.8006 22.4457 24.2683 22.6077 23.7437L21.9674 23.5663ZM24.3434 25.0474C24.1891 25.8266 23.8497 26.8063 23.3637 27.408C23.4563 27.5546 23.5797 27.8169 23.6337 27.9711C23.7494 27.8246 23.8651 27.678 23.9731 27.5083V30.5709H24.5749V26.2971C24.7214 25.9269 24.8371 25.5411 24.9374 25.1786L24.3434 25.0474ZM26.9971 25.1323H26.38V26.1429H24.8757V26.7446H26.38V29.8457C26.38 29.946 26.3491 29.9691 26.2489 29.9691C26.164 29.9769 25.8554 29.9769 25.5314 29.9691C25.6086 30.1389 25.6934 30.4089 25.7166 30.5709C26.2026 30.5709 26.5189 30.5554 26.7271 30.4551C26.9354 30.3549 26.9971 30.1774 26.9971 29.8534V26.7446H27.6066V26.1429H26.9971V25.1323ZM26.1794 28.7349C26.0251 28.326 25.7011 27.6857 25.4234 27.1843L24.9374 27.4157C25.1997 27.9171 25.5237 28.5883 25.6703 29.0049L26.1794 28.7349ZM25.624 24.2837C25.5314 24.0291 25.4003 23.7129 25.2691 23.466L24.6366 23.6357C24.7291 23.8286 24.8217 24.0677 24.8989 24.2837H22.6771V26.8834C22.6771 27.9017 22.6386 29.2826 22.1911 30.2391C22.3531 30.3009 22.6309 30.4783 22.7543 30.594C23.2403 29.5757 23.3174 27.9866 23.3174 26.8834V24.9086H27.6451V24.2837H25.624ZM32.1117 24.5151H34.318V27.948H35.0354V23.8903H31.4174V27.948H32.1117V24.5151ZM31.186 27.8091C31.0471 27.6471 30.5457 27.0609 30.2526 26.7446C30.5997 26.22 30.9006 25.6491 31.1011 25.0551L30.7231 24.8006L30.5843 24.8314H29.89L30.4146 24.5074C30.2757 24.2297 29.9826 23.8363 29.6971 23.5509L29.1494 23.8671C29.3963 24.1449 29.674 24.5537 29.8129 24.8314H28.4937V25.4794H30.2449C29.8051 26.4129 29.0569 27.3 28.3086 27.8014C28.4089 27.948 28.5554 28.326 28.6094 28.5266C28.8717 28.3337 29.1494 28.0946 29.404 27.8169V30.6094H30.0906V27.4466C30.3297 27.7706 30.592 28.1409 30.7309 28.38L31.186 27.8091ZM34.048 29.9691C33.8629 29.9691 33.8011 29.9074 33.8011 29.6991V27.8709H33.3614C33.4926 27.3694 33.5311 26.868 33.5311 26.4283V25.032H32.8446V26.4129C32.8446 27.6009 32.6286 29.082 30.6923 30.0849C30.8311 30.1929 31.0703 30.4706 31.1551 30.6171C32.1966 30.0617 32.7983 29.3289 33.1377 28.5574V29.7763C33.1377 30.3394 33.3614 30.5014 33.9246 30.5014H34.5494C35.2591 30.5014 35.3517 30.1697 35.4289 28.974C35.2591 28.9277 35.0277 28.8351 34.858 28.704C34.8349 29.7531 34.7886 29.9691 34.5571 29.9691H34.048Z" fill="white"/>
|
|
10
|
+
<path d="M21.9674 23.5663L22.2879 22.4099L21.1366 22.0908L20.8124 23.2407L21.9674 23.5663ZM20.5171 26.6057L19.582 25.8537L19.0365 26.5321L19.512 27.2612L20.5171 26.6057ZM20.872 27.3386L19.7442 27.7487L20.4819 29.7773L21.8156 28.08L20.872 27.3386ZM21.358 26.6211H22.558V22.3947L20.337 25.9906L21.358 26.6211ZM21.358 30.6017H20.158V31.8017H21.358V30.6017ZM22.0291 30.6017V31.8017H23.2291V30.6017H22.0291ZM22.0291 25.3097L20.9305 24.827L20.8291 25.0577V25.3097H22.0291ZM22.6077 23.7437L23.7543 24.0978L24.1189 22.9172L22.9282 22.5873L22.6077 23.7437ZM24.3434 25.0474L24.6021 23.8756L23.4045 23.6112L23.1663 24.8143L24.3434 25.0474ZM23.3637 27.408L22.4302 26.654L21.8903 27.3224L22.3491 28.0488L23.3637 27.408ZM23.6337 27.9711L22.5011 28.3676L23.2225 30.4287L24.5756 28.7147L23.6337 27.9711ZM23.9731 27.5083H25.1731V23.3874L22.9607 26.864L23.9731 27.5083ZM23.9731 30.5709H22.7731V31.7709H23.9731V30.5709ZM24.5749 30.5709V31.7709H25.7749V30.5709H24.5749ZM24.5749 26.2971L23.4591 25.8555L23.3749 26.0683V26.2971H24.5749ZM24.9374 25.1786L26.094 25.4985L26.4312 24.2795L25.1961 24.0068L24.9374 25.1786ZM26.9971 25.1323H28.1971V23.9323H26.9971V25.1323ZM26.38 25.1323V23.9323H25.18V25.1323H26.38ZM26.38 26.1429V27.3429H27.58V26.1429H26.38ZM24.8757 26.1429V24.9429H23.6757V26.1429H24.8757ZM24.8757 26.7446H23.6757V27.9446H24.8757V26.7446ZM26.38 26.7446H27.58V25.5446H26.38V26.7446ZM26.2489 29.9691V28.7691H26.1944L26.1402 28.7741L26.2489 29.9691ZM25.5314 29.9691L25.56 28.7695L23.6473 28.7239L24.439 30.4657L25.5314 29.9691ZM25.7166 30.5709L24.5286 30.7406L24.6758 31.7709H25.7166V30.5709ZM26.9971 26.7446V25.5446H25.7971V26.7446H26.9971ZM27.6066 26.7446V27.9446H28.8066V26.7446H27.6066ZM27.6066 26.1429H28.8066V24.9429H27.6066V26.1429ZM26.9971 26.1429H25.7971V27.3429H26.9971V26.1429ZM26.1794 28.7349L26.7416 29.795L27.6753 29.2999L27.3022 28.3112L26.1794 28.7349ZM25.4234 27.1843L26.4732 26.6029L25.9264 25.6157L24.9075 26.1009L25.4234 27.1843ZM24.9374 27.4157L24.4215 26.3323L23.2966 26.8679L23.8741 27.9719L24.9374 27.4157ZM25.6703 29.0049L24.5383 29.4031L25.001 30.7181L26.2325 30.065L25.6703 29.0049ZM25.624 24.2837L24.4962 24.6938L24.7835 25.4837H25.624V24.2837ZM25.2691 23.466L26.3289 22.903L25.8808 22.0595L24.9582 22.307L25.2691 23.466ZM24.6366 23.6357L24.3256 22.4767L22.929 22.8514L23.5547 24.155L24.6366 23.6357ZM24.8989 24.2837V25.4837H26.6017L26.0289 23.8801L24.8989 24.2837ZM22.6771 24.2837V23.0837H21.4771V24.2837H22.6771ZM22.1911 30.2391L21.1042 29.7307L20.5569 30.9007L21.7639 31.3605L22.1911 30.2391ZM22.7543 30.594L21.9336 31.4694L23.1305 32.5916L23.8373 31.1109L22.7543 30.594ZM23.3174 24.9086V23.7086H22.1174V24.9086H23.3174ZM27.6451 24.9086V26.1086H28.8451V24.9086H27.6451ZM27.6451 24.2837H28.8451V23.0837H27.6451V24.2837ZM20.8124 23.2407C20.5156 24.2939 20.05 25.2718 19.582 25.8537L21.4523 27.3577C22.1878 26.4431 22.7713 25.1375 23.1224 23.8919L20.8124 23.2407ZM19.512 27.2612C19.5113 27.2601 19.515 27.2658 19.5232 27.2801C19.5311 27.2939 19.5411 27.3119 19.553 27.3341C19.5768 27.3791 19.6038 27.433 19.6313 27.4907C19.69 27.6141 19.7318 27.7146 19.7442 27.7487L21.9998 26.9285C21.9181 26.704 21.7036 26.2282 21.5223 25.9502L19.512 27.2612ZM21.8156 28.08C22.0293 27.808 22.2128 27.5207 22.379 27.2517L20.337 25.9906C20.1792 26.2462 20.0541 26.4372 19.9284 26.5972L21.8156 28.08ZM20.158 26.6211V30.6017H22.558V26.6211H20.158ZM21.358 31.8017H22.0291V29.4017H21.358V31.8017ZM23.2291 30.6017V25.3097H20.8291V30.6017H23.2291ZM23.1278 25.7924C23.3727 25.2351 23.581 24.659 23.7543 24.0978L21.4611 23.3896C21.3105 23.8775 21.133 24.3661 20.9305 24.827L23.1278 25.7924ZM22.9282 22.5873L22.2879 22.4099L21.647 24.7227L22.2873 24.9001L22.9282 22.5873ZM23.1663 24.8143C23.0277 25.5141 22.7384 26.2724 22.4302 26.654L24.2972 28.162C24.961 27.3401 25.3506 26.1391 25.5206 25.2805L23.1663 24.8143ZM22.3491 28.0488C22.3599 28.0658 22.3908 28.121 22.4299 28.203C22.4685 28.2839 22.4934 28.3457 22.5011 28.3676L24.7663 27.5747C24.6852 27.3429 24.5237 26.9974 24.3783 26.7672L22.3491 28.0488ZM24.5756 28.7147C24.6871 28.5735 24.84 28.3813 24.9855 28.1525L22.9607 26.864C22.8903 26.9747 22.8118 27.0757 22.6919 27.2276L24.5756 28.7147ZM22.7731 27.5083V30.5709H25.1731V27.5083H22.7731ZM23.9731 31.7709H24.5749V29.3709H23.9731V31.7709ZM25.7749 30.5709V26.2971H23.3749V30.5709H25.7749ZM25.6906 26.7388C25.8608 26.3089 25.9899 25.8749 26.094 25.4985L23.7809 24.8587C23.6844 25.2074 23.5821 25.5448 23.4591 25.8555L25.6906 26.7388ZM25.1961 24.0068L24.6021 23.8756L24.0847 26.2192L24.6787 26.3504L25.1961 24.0068ZM26.9971 23.9323H26.38V26.3323H26.9971V23.9323ZM25.18 25.1323V26.1429H27.58V25.1323H25.18ZM26.38 24.9429H24.8757V27.3429H26.38V24.9429ZM23.6757 26.1429V26.7446H26.0757V26.1429H23.6757ZM24.8757 27.9446H26.38V25.5446H24.8757V27.9446ZM25.18 26.7446V29.8457H27.58V26.7446H25.18ZM25.18 29.8457C25.18 29.8224 25.1802 29.7217 25.2163 29.5901C25.2571 29.4411 25.3495 29.2338 25.5469 29.0552C25.7376 28.8827 25.9376 28.8175 26.054 28.792C26.1611 28.7684 26.2402 28.7691 26.2489 28.7691V31.1691C26.2872 31.1691 26.7623 31.1921 27.1571 30.8349C27.5901 30.4431 27.58 29.9287 27.58 29.8457H25.18ZM26.1402 28.7741C26.1644 28.7719 26.1658 28.7728 26.1213 28.7737C26.0865 28.7745 26.0388 28.7749 25.9798 28.7749C25.8624 28.7749 25.7138 28.7731 25.56 28.7695L25.5029 31.1688C25.8035 31.176 26.1893 31.1795 26.3575 31.1642L26.1402 28.7741ZM24.439 30.4657C24.4514 30.4929 24.4748 30.5532 24.498 30.6279C24.5087 30.6627 24.5172 30.6934 24.5231 30.7175C24.5296 30.744 24.5301 30.7508 24.5286 30.7406L26.9045 30.4012C26.8618 30.1019 26.7368 29.7211 26.6239 29.4726L24.439 30.4657ZM25.7166 31.7709C25.9616 31.7709 26.214 31.7675 26.444 31.7448C26.6696 31.7225 26.9606 31.6746 27.2477 31.5363L26.2066 29.3739C26.2854 29.336 26.3141 29.3459 26.208 29.3564C26.1063 29.3665 25.9576 29.3709 25.7166 29.3709V31.7709ZM27.2477 31.5363C27.5938 31.3697 27.8804 31.0933 28.0444 30.7082C28.182 30.3849 28.1971 30.0638 28.1971 29.8534H25.7971C25.7971 29.9671 25.7814 29.8966 25.8361 29.7681C25.869 29.691 25.9219 29.6043 26.0001 29.5246C26.0766 29.4464 26.1532 29.3997 26.2066 29.3739L27.2477 31.5363ZM28.1971 29.8534V26.7446H25.7971V29.8534H28.1971ZM26.9971 27.9446H27.6066V25.5446H26.9971V27.9446ZM28.8066 26.7446V26.1429H26.4066V26.7446H28.8066ZM27.6066 24.9429H26.9971V27.3429H27.6066V24.9429ZM28.1971 26.1429V25.1323H25.7971V26.1429H28.1971ZM27.3022 28.3112C27.1158 27.8173 26.7566 27.1145 26.4732 26.6029L24.3737 27.7657C24.6457 28.2569 24.9345 28.8347 25.0567 29.1585L27.3022 28.3112ZM24.9075 26.1009L24.4215 26.3323L25.4533 28.4991L25.9393 28.2677L24.9075 26.1009ZM23.8741 27.9719C24.1338 28.4685 24.4226 29.0742 24.5383 29.4031L26.8023 28.6066C26.6249 28.1024 26.2656 27.3658 26.0007 26.8595L23.8741 27.9719ZM26.2325 30.065L26.7416 29.795L25.6172 27.6747L25.1081 27.9447L26.2325 30.065ZM26.7518 23.8736C26.6483 23.5892 26.4955 23.2166 26.3289 22.903L24.2094 24.029C24.3051 24.2091 24.4145 24.4691 24.4962 24.6938L26.7518 23.8736ZM24.9582 22.307L24.3256 22.4767L24.9475 24.7947L25.5801 24.625L24.9582 22.307ZM23.5547 24.155C23.6204 24.2918 23.6966 24.4853 23.7688 24.6873L26.0289 23.8801C25.9468 23.6502 25.8379 23.3653 25.7184 23.1164L23.5547 24.155ZM24.8989 23.0837H22.6771V25.4837H24.8989V23.0837ZM21.4771 24.2837V26.8834H23.8771V24.2837H21.4771ZM21.4771 26.8834C21.4771 27.9467 21.4203 29.0548 21.1042 29.7307L23.2781 30.7476C23.8568 29.5104 23.8771 27.8567 23.8771 26.8834H21.4771ZM21.7639 31.3605C21.7402 31.3515 21.7391 31.3491 21.7645 31.3627C21.7859 31.3741 21.8141 31.3905 21.8453 31.4102C21.8765 31.43 21.9041 31.4489 21.9247 31.4642C21.9488 31.4819 21.949 31.4839 21.9336 31.4694L23.575 29.7186C23.4342 29.5866 23.2625 29.4669 23.129 29.3824C22.9971 29.2989 22.809 29.1904 22.6183 29.1178L21.7639 31.3605ZM23.8373 31.1109C24.1626 30.4293 24.3233 29.6276 24.4094 28.9145C24.4976 28.1848 24.5174 27.4584 24.5174 26.8834H22.1174C22.1174 27.4116 22.0987 28.0314 22.0268 28.6266C21.9529 29.2384 21.832 29.7405 21.6713 30.0771L23.8373 31.1109ZM24.5174 26.8834V24.9086H22.1174V26.8834H24.5174ZM23.3174 26.1086H27.6451V23.7086H23.3174V26.1086ZM28.8451 24.9086V24.2837H26.4451V24.9086H28.8451ZM27.6451 23.0837H25.624V25.4837H27.6451V23.0837ZM32.1117 24.5151V23.3151H30.9117V24.5151H32.1117ZM34.318 24.5151H35.518V23.3151H34.318V24.5151ZM34.318 27.948H33.118V29.148H34.318V27.948ZM35.0354 27.948V29.148H36.2354V27.948H35.0354ZM35.0354 23.8903H36.2354V22.6903H35.0354V23.8903ZM31.4174 23.8903V22.6903H30.2174V23.8903H31.4174ZM31.4174 27.948H30.2174V29.148H31.4174V27.948ZM32.1117 27.948V29.148H33.3117V27.948H32.1117ZM31.186 27.8091L32.1243 28.5572L32.7428 27.7815L32.0971 27.0282L31.186 27.8091ZM30.2526 26.7446L29.2519 26.0823L28.7315 26.8687L29.3725 27.5603L30.2526 26.7446ZM31.1011 25.0551L32.2381 25.439L32.5311 24.5714L31.7715 24.0598L31.1011 25.0551ZM30.7231 24.8006L31.3935 23.8052L30.966 23.5173L30.4628 23.6291L30.7231 24.8006ZM30.5843 24.8314V26.0314H30.716L30.8446 26.0029L30.5843 24.8314ZM29.89 24.8314L29.2594 23.8105L25.6636 26.0314H29.89V24.8314ZM30.4146 24.5074L31.0452 25.5284L31.9785 24.9519L31.4879 23.9708L30.4146 24.5074ZM29.6971 23.5509L30.5457 22.7023L29.8945 22.0512L29.0971 22.5117L29.6971 23.5509ZM29.1494 23.8671L28.5493 22.828L27.2745 23.5641L28.2525 24.6644L29.1494 23.8671ZM29.8129 24.8314V26.0314H31.7545L30.8862 24.2948L29.8129 24.8314ZM28.4937 24.8314V23.6314H27.2937V24.8314H28.4937ZM28.4937 25.4794H27.2937V26.6794H28.4937V25.4794ZM30.2449 25.4794L31.3304 25.9908L32.1366 24.2794H30.2449V25.4794ZM28.3086 27.8014L27.6406 26.8046L26.634 27.4791L27.3182 28.479L28.3086 27.8014ZM28.6094 28.5266L27.4507 28.8385L27.9068 30.5327L29.3203 29.4934L28.6094 28.5266ZM29.404 27.8169H30.604V24.7319L28.5194 27.006L29.404 27.8169ZM29.404 30.6094H28.204V31.8094H29.404V30.6094ZM30.0906 30.6094V31.8094H31.2906V30.6094H30.0906ZM30.0906 27.4466L31.0561 26.7339L28.8906 23.8001V27.4466H30.0906ZM30.7309 28.38L29.6931 28.9826L30.5747 30.5008L31.6691 29.1281L30.7309 28.38ZM33.8011 27.8709H35.0011V26.6709H33.8011V27.8709ZM33.3614 27.8709L32.2005 27.5672L31.8072 29.0709H33.3614V27.8709ZM33.5311 25.032H34.7311V23.832H33.5311V25.032ZM32.8446 25.032V23.832H31.6446V25.032H32.8446ZM30.6923 30.0849L30.1404 29.0193L28.476 29.8813L29.9556 31.0321L30.6923 30.0849ZM31.1551 30.6171L30.1166 31.2184L30.6973 32.2213L31.7198 31.676L31.1551 30.6171ZM33.1377 28.5574H34.3377L32.0393 28.0741L33.1377 28.5574ZM35.4289 28.974L36.6264 29.0513L36.6894 28.074L35.7446 27.8163L35.4289 28.974ZM34.858 28.704L35.5917 27.7545L33.7107 26.3009L33.6583 28.6775L34.858 28.704ZM32.1117 25.7151H34.318V23.3151H32.1117V25.7151ZM33.118 24.5151V27.948H35.518V24.5151H33.118ZM34.318 29.148H35.0354V26.748H34.318V29.148ZM36.2354 27.948V23.8903H33.8354V27.948H36.2354ZM35.0354 22.6903H31.4174V25.0903H35.0354V22.6903ZM30.2174 23.8903V27.948H32.6174V23.8903H30.2174ZM31.4174 29.148H32.1117V26.748H31.4174V29.148ZM33.3117 27.948V24.5151H30.9117V27.948H33.3117ZM32.0971 27.0282C31.9654 26.8745 31.4456 26.2665 31.1327 25.9289L29.3725 27.5603C29.6458 27.8552 30.1289 28.4198 30.2749 28.5901L32.0971 27.0282ZM31.2533 27.4068C31.6432 26.8176 31.9969 26.1534 32.2381 25.439L29.9642 24.6712C29.8043 25.1449 29.5562 25.6224 29.2519 26.0823L31.2533 27.4068ZM31.7715 24.0598L31.3935 23.8052L30.0528 25.7959L30.4308 26.0505L31.7715 24.0598ZM30.4628 23.6291L30.324 23.66L30.8446 26.0029L30.9835 25.972L30.4628 23.6291ZM30.5843 23.6314H29.89V26.0314H30.5843V23.6314ZM30.5206 25.8524L31.0452 25.5284L29.784 23.4865L29.2594 23.8105L30.5206 25.8524ZM31.4879 23.9708C31.279 23.553 30.9004 23.0571 30.5457 22.7023L28.8486 24.3994C29.0647 24.6155 29.2724 24.9065 29.3413 25.0441L31.4879 23.9708ZM29.0971 22.5117L28.5493 22.828L29.7495 24.9063L30.2972 24.59L29.0971 22.5117ZM28.2525 24.6644C28.4357 24.8704 28.6518 25.1927 28.7395 25.3681L30.8862 24.2948C30.6962 23.9148 30.3569 23.4193 30.0463 23.0699L28.2525 24.6644ZM29.8129 23.6314H28.4937V26.0314H29.8129V23.6314ZM27.2937 24.8314V25.4794H29.6937V24.8314H27.2937ZM28.4937 26.6794H30.2449V24.2794H28.4937V26.6794ZM29.1593 24.968C28.8023 25.7259 28.1898 26.4365 27.6406 26.8046L28.9766 28.7983C29.9239 28.1635 30.808 27.0998 31.3304 25.9908L29.1593 24.968ZM27.3182 28.479C27.2941 28.4438 27.292 28.4336 27.3105 28.4718C27.3249 28.5016 27.3437 28.5438 27.3643 28.5948C27.4085 28.7036 27.4403 28.7999 27.4507 28.8385L29.7682 28.2146C29.7246 28.0526 29.6561 27.8596 29.5884 27.6927C29.5299 27.5486 29.428 27.3124 29.2989 27.1238L27.3182 28.479ZM29.3203 29.4934C29.636 29.2612 29.9739 28.971 30.2886 28.6277L28.5194 27.006C28.3249 27.2182 28.1074 27.4062 27.8986 27.5598L29.3203 29.4934ZM28.204 27.8169V30.6094H30.604V27.8169H28.204ZM29.404 31.8094H30.0906V29.4094H29.404V31.8094ZM31.2906 30.6094V27.4466H28.8906V30.6094H31.2906ZM29.1251 28.1592C29.3668 28.4867 29.5917 28.8078 29.6931 28.9826L31.7686 27.7774C31.5923 27.4739 31.2926 27.0545 31.0561 26.7339L29.1251 28.1592ZM31.6691 29.1281L32.1243 28.5572L30.2477 27.0611L29.7926 27.6319L31.6691 29.1281ZM34.048 28.7691C34.0572 28.7691 34.1417 28.7685 34.2593 28.8019C34.3925 28.8398 34.5743 28.9235 34.7338 29.0949C34.8886 29.2614 34.9525 29.4356 34.9786 29.541C34.9914 29.5927 34.9965 29.6334 34.9988 29.6573C35.0011 29.6815 35.0011 29.6966 35.0011 29.6991H32.6011C32.6011 29.842 32.6031 30.3282 32.9765 30.7296C33.3764 31.1595 33.8911 31.1691 34.048 31.1691V28.7691ZM35.0011 29.6991V27.8709H32.6011V29.6991H35.0011ZM33.8011 26.6709H33.3614V29.0709H33.8011V26.6709ZM34.5224 28.1745C34.6874 27.5436 34.7311 26.9335 34.7311 26.4283H32.3311C32.3311 26.8025 32.2978 27.1952 32.2005 27.5672L34.5224 28.1745ZM34.7311 26.4283V25.032H32.3311V26.4283H34.7311ZM33.5311 23.832H32.8446V26.232H33.5311V23.832ZM31.6446 25.032V26.4129H34.0446V25.032H31.6446ZM31.6446 26.4129C31.6446 26.9448 31.5928 27.4068 31.4042 27.8172C31.2291 28.198 30.892 28.63 30.1404 29.0193L31.2442 31.1504C32.4289 30.5368 33.1679 29.7268 33.5849 28.8194C33.9884 27.9415 34.0446 27.0689 34.0446 26.4129H31.6446ZM29.9556 31.0321C29.9341 31.0154 29.935 31.0136 29.9604 31.0391C29.9815 31.0604 30.0084 31.0893 30.0371 31.1225C30.0658 31.1555 30.0908 31.1865 30.1091 31.2108C30.1311 31.2399 30.1298 31.2412 30.1166 31.2184L32.1937 30.0159C32.0942 29.8442 31.9548 29.6707 31.8508 29.5506C31.7472 29.4311 31.5919 29.2643 31.429 29.1376L29.9556 31.0321ZM31.7198 31.676C33.0001 30.9931 33.789 30.0568 34.2361 29.0407L32.0393 28.0741C31.8076 28.6009 31.393 29.1303 30.5904 29.5583L31.7198 31.676ZM31.9377 28.5574V29.7763H34.3377V28.5574H31.9377ZM31.9377 29.7763C31.9377 30.1659 32.0058 30.7931 32.5283 31.2518C33.0073 31.6723 33.6006 31.7014 33.9246 31.7014V29.3014C33.8321 29.3014 33.8163 29.2938 33.8435 29.3003C33.8781 29.3086 33.9909 29.3422 34.1116 29.4482C34.2391 29.5601 34.3009 29.6868 34.3259 29.7662C34.346 29.83 34.3377 29.8473 34.3377 29.7763H31.9377ZM33.9246 31.7014H34.5494V29.3014H33.9246V31.7014ZM34.5494 31.7014C34.8009 31.7014 35.1367 31.6755 35.4713 31.5236C35.8487 31.3524 36.1178 31.0711 36.2898 30.7421C36.4412 30.4524 36.5069 30.146 36.5448 29.8994C36.5841 29.6434 36.6069 29.3525 36.6264 29.0513L34.2313 28.8967C34.2122 29.1934 34.1945 29.3923 34.1726 29.5349C34.1493 29.6867 34.133 29.6874 34.1629 29.6301C34.1824 29.5928 34.2192 29.535 34.2809 29.4748C34.3441 29.4131 34.4139 29.3679 34.4795 29.3382C34.5947 29.2859 34.6529 29.3014 34.5494 29.3014V31.7014ZM35.7446 27.8163C35.7177 27.8089 35.6773 27.7952 35.6376 27.7773C35.6189 27.7688 35.6046 27.7614 35.595 27.7558C35.5851 27.7501 35.5848 27.7491 35.5917 27.7545L34.1243 29.6535C34.4623 29.9147 34.8566 30.0618 35.1131 30.1317L35.7446 27.8163ZM33.6583 28.6775C33.6526 28.9358 33.6458 29.1242 33.6364 29.2643C33.6265 29.4135 33.6163 29.4607 33.6173 29.4562C33.6187 29.4502 33.6293 29.4053 33.6593 29.3407C33.6902 29.2739 33.7498 29.169 33.857 29.0636C33.9703 28.9521 34.1064 28.8701 34.2502 28.8214C34.3845 28.7758 34.496 28.7691 34.5571 28.7691V31.1691C34.8153 31.1691 35.2082 31.101 35.5401 30.7744C35.8189 30.5002 35.914 30.1744 35.954 30.0038C36.032 29.671 36.047 29.2157 36.0577 28.7305L33.6583 28.6775ZM34.5571 28.7691H34.048V31.1691H34.5571V28.7691Z" fill="#444444"/>
|
|
11
|
+
</svg>
|
|
@@ -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"),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,
|
|
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,L]=React.useState([]),{topViewInstance:w,displayPointCloudList:C}=React.useContext(PointCloudContext.PointCloudContext),[r,p]=React.useState(0),x=React.useRef(null),f=React.useRef(),{selectedBox:v}=useSingleBox.useSingleBox(),I=useSize(x),{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=C.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(y=>({type:y.type,annotation:__spreadProps(__spreadValues({id:i.id,pointList:y.pointList},o),{stroke:j})}))]},[]);L(l)}},[C,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:x},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),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,
|
|
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:()=>{},followTopView:()=>{}}),PointCloudViewIcon=({perspectiveView:e})=>{const{isActive:t,setTarget3DView:r}=React.useContext(PointCloud3DContext),n=m=>classNames__default.default({[dom.getClassName("point-cloud-3d-view",m)]:!0,active:t});return React__default.default.createElement("span",{onClick:()=>{r(lbUtils.EPerspectiveView[e])},className:n(e.toLocaleLowerCase())})},PointCloud3DSideBar=()=>{const{reset3DView:e,followTopView:t}=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:()=>{t()},className:dom.getClassName("point-cloud-3d-view","followTop")}),React__default.default.createElement("span",{onClick:()=>{e()},className:dom.getClassName("point-cloud-3d-view","reset")}))},PointCloud3D=({currentData:e,config:t})=>{var r;const n=React.useContext(PointCloudContext.PointCloudContext),[m,C]=React.useState(!0),c=React.useRef(null),{initPointCloud3d:p}=usePointCloudViews.usePointCloudViews(),l=useSize(c),{t:v}=reactI18next.useTranslation();React.useEffect(()=>{!n.mainViewInstance||p==null||p(l)},[l]);const{selectedBox:s}=useSingleBox.useSingleBox(),f=a=>{var o;const i=s==null?void 0:s.info;i&&((o=n.mainViewInstance)==null||o.updateCameraByBox(i,a))},w=()=>{var a;(a=n.mainViewInstance)==null||a.resetCamera()},g=()=>{var a,o;const i=(a=n.topViewInstance)==null?void 0:a.pointCloudInstance.camera;i&&((o=n.mainViewInstance)==null||o.applyCameraTarget(i))};React.useEffect(()=>{var a;if(c.current&&(e==null?void 0:e.url)){let o=n.mainViewInstance;if(!o&&l.width){const i={left:-l.width/2,right:l.width/2,top:l.height/2,bottom:-l.height/2,near:100,far:-100};o=new lbAnnotation.PointCloud({container:c.current,isOrthographicCamera:!0,orthographicParams:i,config:t}),n.setMainViewInstance(o)}if(e.result){const i=lbUtils.PointCloudUtils.getBoxParamsFromResultList(e.result);i.forEach(u=>{var d;const _=(d=lbUtils.toolStyleConverter.getColorFromConfig({attribute:u.attribute},__spreadProps(__spreadValues({},t),{attributeConfigurable:!0}),{}))==null?void 0:d.hex;o==null||o.generateBox(u,_)}),n.setPointCloudResult(i),n.setPointCloudValid((a=index.jsonParser(e.result))==null?void 0:a.valid)}}},[e,l]),React.useEffect(()=>{var a,o,i,u;if(s){f(lbUtils.EPerspectiveView.Top);const d=(i=(o=(a=n.topViewInstance)==null?void 0:a.pointCloudInstance)==null?void 0:o.camera.zoom)!=null?i:1;(u=n.mainViewInstance)==null||u.updateCameraZoom(d)}},[s]);const P=React.useMemo(()=>({reset3DView:w,setTarget3DView:f,isActive:!!s,followTopView:g}),[s]),V=React__default.default.createElement("div",null,React__default.default.createElement("span",{style:{marginRight:8}},v("ShowArrows")),React__default.default.createElement(antd.Switch,{size:"small",checked:m,onChange:a=>{var o;C(a),(o=n.mainViewInstance)==null||o.setShowDirection(a)}}));return React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-3d-container"),title:v("3DView"),toolbar:V,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:c})))};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"),
|
|
1
|
+
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),dom=require("../../utils/dom.js"),PointCloudLayout=require("./PointCloudLayout.js"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),useSingleBox=require("./hooks/useSingleBox.js"),PointCloudInfos=require("./PointCloudInfos.js"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js"),index=require("./components/EmptyPage/index.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(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,o)=>n in t?__defProp(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,__spreadValues=(t,n)=>{for(var o in n||(n={}))__hasOwnProp.call(n,o)&&__defNormalProp(t,o,n[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(n))__propIsEnum.call(n,o)&&__defNormalProp(t,o,n[o]);return t},__spreadProps=(t,n)=>__defProps(t,__getOwnPropDescs(n));const TransferCanvas2WorldOffset=(t,n,o=1)=>{const{width:e,height:i}=n,s={x:t.x+e*o/2,y:t.y+i*o/2},d={x:n.width/2,y:n.height/2};return{offsetX:(d.x-s.x)/o,offsetY:-(d.y-s.y)/o}},updateBackViewByCanvas2D=(t,n,o,e,i)=>{const{offsetX:s,offsetY:d}=TransferCanvas2WorldOffset(t,o,n);if(i.camera.zoom=n,t){const p=Math.cos(e.rotation),P=Math.sin(e.rotation),g=s*p,h=s*P,{x:r,y:u,z:c}=i.initCameraPosition;i.camera.position.set(r+h,u-g,c+d)}i.camera.updateProjectionMatrix(),i.render()},PointCloudSideView=({currentData:t,config:n,checkMode:o})=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),i=React.useRef(null),s=useSize(i),{selectedBox:d,updateSelectedBox:p}=useSingleBox.useSingleBox(),{t:P}=reactI18next.useTranslation(),{backViewUpdateBox:g}=usePointCloudViews.usePointCloudViews(),h=(r,u)=>{if(!e.selectedPointCloudBox||!e.mainViewInstance||!t.url||!e.backViewInstance)return;const{pointCloudInstance:c}=e.backViewInstance,[l,f,x]=r.pointList,[v,m,y]=u.pointList,w=lbAnnotation.MathUtils.getLineCenterPoint([l,x]),C=lbAnnotation.MathUtils.getLineCenterPoint([v,y]),V={x:{x:w.x-C.x,y:w.y-C.y}.x,y:0,z:w.y-C.y},B=lbAnnotation.MathUtils.getLineLength(l,f),b=lbAnnotation.MathUtils.getLineLength(v,m),I=B-b,_=lbAnnotation.MathUtils.getLineLength(f,x),O=lbAnnotation.MathUtils.getLineLength(m,y),L=_-O;let{newBoxParams:a}=c.getNewBoxByBackUpdate(V,L,I,e.selectedPointCloudBox);if(e.mainViewInstance){const{count:j}=e.mainViewInstance.getSensesPointZAxisInPolygon(lbAnnotation.getCuboidFromPointCloudBox(a).polygonPointList,[a.center.z-a.depth/2,a.center.z+a.depth/2]);a=__spreadProps(__spreadValues({},a),{count:j})}usePointCloudViews.synchronizeTopView(a,r,e.topViewInstance,e.mainViewInstance),usePointCloudViews.synchronizeSideView(a,r,e.sideViewInstance,t.url),e.mainViewInstance.highlightOriginPointCloud([a]),p(a)};return React.useEffect(()=>{if(i.current){const r={width:i.current.clientWidth,height:i.current.clientHeight},u=new lbAnnotation.PointCloudAnnotation({container:i.current,size:r,polygonOperationProps:{showDirectionLine:!1,forbidAddNew:!0},config:n,checkMode:o});e.setBackViewInstance(u)}},[]),React.useEffect(()=>{if(!s||!e.backViewInstance)return;const{pointCloud2dOperation:r,pointCloudInstance:u}=e.backViewInstance;r.singleOn("renderZoom",(c,l)=>{!e.selectedPointCloudBox||updateBackViewByCanvas2D(l,c,s,e.selectedPointCloudBox,u)}),r.singleOn("dragMove",({currentPos:c,zoom:l})=>{!e.selectedPointCloudBox||updateBackViewByCanvas2D(c,l,s,e.selectedPointCloudBox,u)}),r.singleOn("updatePolygonByDrag",c=>{if(e.selectedIDs.length===1&&c.length===1){const{newPolygon:l,originPolygon:f}=c[0];l&&f&&(h(l,f),g(l,f))}})},[e,s]),React.useEffect(()=>{var r;(r=e==null?void 0:e.backViewInstance)==null||r.initSize(s)},[s]),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 lbAnnotation=require("@labelbee/lb-annotation")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var React__default=_interopDefaultLegacy(React);const PointCloudContext=React__default.default.createContext({pointCloudBoxList:[],displayPointCloudList:[],polygonList:[],selectedID:"",selectedIDs:[],valid:!0,setSelectedIDs:()=>{},setPointCloudResult:()=>{},setPointCloudValid:()=>{},setTopViewInstance:()=>{},setSideViewInstance:()=>{},setBackViewInstance:()=>{},setMainViewInstance:()=>{},addSelectedID:()=>{},selectedAllBoxes:()=>{},addPointCloudBox:()=>[],setPolygonList:()=>{},zoom:1,setZoom:()=>{},history:new lbAnnotation.ActionsHistory,hideAttributes:[],toggleAttributesVisible:()=>{},reRender:()=>{},setAttrPanelLayout:()=>{},attrPanelLayout:"",syncAllViewPointCloudColor:()=>{},defaultAttribute:"",setDefaultAttribute:()=>{},pointCloudPattern:lbAnnotation.EToolName.Rect,setPointCloudPattern:()=>{}}),PointCloudProvider=({children:i})=>{const[l,A]=React.useState([]),[c,E]=React.useState([]),[o,f]=React.useState([]),[y,H]=React.useState(!0),[b,M]=React.useState(1),[a,O]=React.useState(),[w,T]=React.useState(),[I,_]=React.useState(),[s,j]=React.useState(),[V,k]=React.useState(""),[g,N]=React.useState(lbAnnotation.EToolName.Rect),q=React.useRef(new lbAnnotation.ActionsHistory).current,[n,P]=React.useState([]),[m,z]=React.useState(""),x=React.useMemo(()=>o.length===1?o[0]:"",[o]),L=React.useMemo(()=>{const d=l.find(t=>t.id===x),C=t=>{const e=l.concat(t);return A(e),e},p=t=>{H(t!==!1)},u=t=>{t===void 0&&f([]),typeof t=="string"&&f([t]),Array.isArray(t)&&f(Array.from(new Set(t)))},r=t=>{o.includes(t)?u(o.filter(e=>e!==t)):u([...o,t])},Z=()=>{u(l.map(t=>t.id))},h=l.filter(t=>!n.includes(t.attribute)),G=t=>{if(n.includes(t))P(n.filter(e=>e!==t));else{const e=n.concat(t);P(e)}},J=(t=h,e=c)=>{t.forEach(S=>{s==null||s.removeObjectByName(S.id)}),a==null||a.updatePolygonList(t,e),s==null||s.generateBoxes(t),B(t)},B=t=>{const e=s==null?void 0:s.highlightOriginPointCloud(t);return new Promise(S=>{e==null||e.then(v=>{[a].forEach(R=>{var D;v&&((D=R==null?void 0:R.pointCloudInstance)==null||D.updateColor(v),S({color:v}))})})})};return{selectedID:x,pointCloudBoxList:l,displayPointCloudList:h,selectedIDs:o,setPointCloudResult:A,setSelectedIDs:u,addPointCloudBox:C,valid:y,selectedPointCloudBox:d,setPointCloudValid:p,addSelectedID:r,selectedAllBoxes:Z,topViewInstance:a,setTopViewInstance:O,sideViewInstance:w,setSideViewInstance:T,backViewInstance:I,setBackViewInstance:_,mainViewInstance:s,setMainViewInstance:j,polygonList:c,setPolygonList:E,zoom:b,setZoom:M,history:q,toggleAttributesVisible:G,hideAttributes:n,setHideAttributes:P,reRender:J,attrPanelLayout:m,setAttrPanelLayout:z,syncAllViewPointCloudColor:B,defaultAttribute:V,setDefaultAttribute:k,pointCloudPattern:g,setPointCloudPattern:N}},[y,o,l,c,a,w,I,s,b,n,m,V,g]),F=()=>{const d=l.filter(r=>n.includes(r.attribute)),{setSelectedIDs:C,reRender:p}=L,u=d.map(r=>r.id);u.length>0&&C(o.filter(r=>!u.includes(r))),p()};return React.useEffect(()=>{var d;F(),(d=a==null?void 0:a.pointCloud2dOperation)==null||d.setHiddenAttributes(n)},[n]),React__default.default.createElement(PointCloudContext.Provider,{value:L},i)};exports.PointCloudContext=PointCloudContext,exports.PointCloudProvider=PointCloudProvider;
|
|
@@ -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"),useAttribute=require("./hooks/useAttribute.js"),useConfig=require("./hooks/useConfig.js"),usePolygon=require("./hooks/usePolygon.js"),reactI18next=require("react-i18next"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(i,r,n)=>r in i?__defProp(i,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[r]=n,__spreadValues=(i,r)=>{for(var n in r||(r={}))__hasOwnProp.call(r,n)&&__defNormalProp(i,n,r[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(r))__propIsEnum.call(r,n)&&__defNormalProp(i,n,r[n]);return i},__spreadProps=(i,r)=>__defProps(i,__getOwnPropDescs(r));const{EPolygonPattern}=lbAnnotation.cTool,PointCloudListener=({currentData:i,config:r,checkMode:n,configString:
|
|
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"),useConfig=require("./hooks/useConfig.js"),usePolygon=require("./hooks/usePolygon.js"),reactI18next=require("react-i18next"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(i,r,n)=>r in i?__defProp(i,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[r]=n,__spreadValues=(i,r)=>{for(var n in r||(r={}))__hasOwnProp.call(r,n)&&__defNormalProp(i,n,r[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(r))__propIsEnum.call(r,n)&&__defNormalProp(i,n,r[n]);return i},__spreadProps=(i,r)=>__defProps(i,__getOwnPropDescs(r));const{EPolygonPattern}=lbAnnotation.cTool,PointCloudListener=({currentData:i,config:r,checkMode:n,configString:k,imgIndex:h})=>{const o=React.useContext(PointCloudContext.PointCloudContext),{changeSelectedBoxValid:_,selectNextBox:B,selectPrevBox:S,updateSelectedBox:P,deleteSelectedPointCloudBoxAndPolygon:I}=useSingleBox.useSingleBox(),{clearAllResult:v,updatePointCloudPattern:V}=useStatus.useStatus(),E=index.jsonParser(i.result),{copySelectedBoxes:O,pasteSelectedBoxes:A,copiedBoxes:q}=useBoxes.useBoxes({config:r}),{toolInstanceRef:a}=annotation.useCustomToolInstance({basicInfo:E}),{updateRotate:b}=useRotate.useRotate({currentData:i}),{updatePointCloudData:y,topViewSelectedChanged:j}=usePointCloudViews.usePointCloudViews(),{redo:C,undo:w,pushHistoryWithList:L,pushHistoryUnderUpdatePolygon:R}=useHistory.useHistory(),{syncThreeViewsAttribute:x}=useAttribute.useAttribute(),{syncAllViewsConfig:T,reRenderTopViewRange:D}=useConfig.useConfig(),{selectedPolygon:g}=usePolygon.usePolygon(),{t:f}=reactI18next.useTranslation(),p=e=>{var t;const{topViewInstance:s}=o;!s||(t=s.pointCloud2dOperation)==null||t.updateSelectedPolygonsPoints(e)},N=(e,t)=>{var s;const{topViewInstance:u,mainViewInstance:l}=o;if(!u)return;const{pointCloud2dOperation:c}=u;switch(e){case"q":{b(2);break}case"e":b(-2);break;case"g":b(180);break;case"u":{const d=c.pattern===EPolygonPattern.Normal?lbAnnotation.EToolName.Rect:lbAnnotation.EToolName.Polygon;V(d);const H={[lbAnnotation.EToolName.Polygon]:f("PolygonPattern"),[lbAnnotation.EToolName.Rect]:f("RectPattern")};antd.message.success(f("ChangePatternMsg",{pattern:H[d]})),c.clearActiveStatus(),c.clearDrawingStatus()}break;case"+":l==null||l.updatePointSize(!0);break;case"-":l==null||l.updatePointSize(!1);break;case"v":o.setPointCloudValid(!o.valid);break;case"tab":if(t.shiftKey){S();break}B(),t.preventDefault();break;case"f":_();break;case"arrowup":p({y:-1});break;case"arrowdown":p({y:1});break;case"arrowleft":p({x:-1});break;case"arrowright":p({x:1});break;case"delete":I();break;default:{if(((s=r.attributeList)==null?void 0:s.length)>0){const d=lbAnnotation.AttributeUtils.getAttributeByKeycode(t.keyCode,r.attributeList);d!==void 0&&a.current.setDefaultAttribute(d)}return}}},K=(e,t)=>{switch(e){case"c":O();break;case"v":A();break;case"a":o.selectedAllBoxes();break;case"z":{t.shiftKey?C():w();break}}},m=e=>{if(!lbAnnotation.CommonToolUtils.hotkeyFilter(e)||n===!0)return;const t=e.key.toLocaleLowerCase();if(e.ctrlKey){K(t,e);return}N(t,e)};return React.useEffect(()=>{const{topViewInstance:e}=o;if(!!e)return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[o,q,r,o.pointCloudBoxList,o.polygonList]),React.useEffect(()=>{T(r)},[k]),React.useEffect(()=>{(r==null?void 0:r.radius)&&D(r==null?void 0:r.radius)},[r==null?void 0:r.radius]),React.useEffect(()=>{y==null||y()},[h,o.mainViewInstance]),React.useEffect(()=>{a.current.exportData=()=>[o.pointCloudBoxList,{valid:o.valid}],a.current.exportCustomData=()=>{var e;return{resultPolygon:(e=o.polygonList)!=null?e:[]}},a.current.setDefaultAttribute=e=>{x(e);const t=o.selectedPointCloudBox;if(t){t.attribute=e;const s=P(t);o.mainViewInstance&&j(t,s)}g&&R(__spreadProps(__spreadValues({},g),{attribute:e}))},a.current.setSubAttribute=(e,t)=>{var s;const u=o.selectedPointCloudBox;if(u){const l=(s=u==null?void 0:u.subAttribute)!=null?s:{};u.subAttribute=__spreadProps(__spreadValues({},l),{[e]:t}),P(u)}},a.current.clearResult=()=>{v==null||v()},a.current.redo=()=>{C()},a.current.undo=()=>{w()},a.current.setValid=e=>{a.current.valid=e,setTimeout(()=>{o.setPointCloudValid(e),e===!1&&v()})},a.current.setForbidOperation=e=>{var t,s;(s=(t=o.topViewInstance)==null?void 0:t.pointCloud2dOperation)==null||s.setForbidOperation(e),e===!0&&o.setSelectedIDs(void 0)},a.current.setShowDefaultCursor=e=>{var t,s;(s=(t=o.topViewInstance)==null?void 0:t.pointCloud2dOperation)==null||s.setShowDefaultCursor(e)}},[o.pointCloudBoxList,o.selectedID,o.valid,o.polygonList,o.mainViewInstance]),React.useEffect(()=>{a.current.history={pushHistory:e=>{L({pointCloudBoxList:e})},initRecord:()=>{}}},[]),React.useEffect(()=>{var e;const t=(e=o.topViewInstance)==null?void 0:e.pointCloud2dOperation;if(!t||n)return;const s=c=>{x(c)},u=c=>{antd.message.error(c)},l=c=>{antd.message.info(c)};return t.on("syncAttribute",s),t.on("messageError",u),t.on("messageInfo",l),()=>{t.unbind("syncAttribute",s),t.unbind("messageError",u),t.unbind("messageInfo",l)}},[o.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(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const TransferCanvas2WorldOffset=(t,s,e=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(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const TransferCanvas2WorldOffset=(t,s,e=1)=>{const{width:c,height:r}=s,n={x:t.x+c*e/2,y:t.y+r*e/2},o={x:s.width/2,y:s.height/2};return{offsetX:(o.x-n.x)/e,offsetY:-(o.y-n.y)/e}},updateSideViewByCanvas2D=(t,s,e,c,r)=>{const{offsetX:n,offsetY:o}=TransferCanvas2WorldOffset(t,e,s);if(r.camera.zoom=s,t){const d=Math.cos(c.rotation),i=Math.sin(c.rotation),u=n*d,a=n*i,{x:l,y:f,z:x}=r.initCameraPosition;r.camera.position.set(l-u,f-a,x+o)}r.camera.updateProjectionMatrix(),r.render()},PointCloudSideView=({config:t,checkMode:s})=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),{sideViewUpdateBox:c}=usePointCloudViews.usePointCloudViews(),{selectedBox:r}=useSingleBox.useSingleBox(),n=React.useRef(null),o=useSize(n),{t:d}=reactI18next.useTranslation();return React.useEffect(()=>{if(n.current){const i={width:n.current.clientWidth,height:n.current.clientHeight},u=new lbAnnotation.PointCloudAnnotation({container:n.current,size:i,polygonOperationProps:{showDirectionLine:!1,forbidAddNew:!0},config:t,checkMode:s});e.setSideViewInstance(u)}},[]),React.useEffect(()=>{if(!o||!e.sideViewInstance)return;const{pointCloud2dOperation:i,pointCloudInstance:u}=e.sideViewInstance;i.singleOn("renderZoom",(a,l)=>{!e.selectedPointCloudBox||updateSideViewByCanvas2D(l,a,o,e.selectedPointCloudBox,u)}),i.singleOn("dragMove",({currentPos:a,zoom:l})=>{!e.selectedPointCloudBox||updateSideViewByCanvas2D(a,l,o,e.selectedPointCloudBox,u)}),i.singleOn("updatePolygonByDrag",a=>{if(e.selectedIDs.length===1&&a.length===1){const{newPolygon:l,originPolygon:f}=a[0];c(l,f)}})},[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:d("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:n}),!r&&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$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"),lbUtils=require("@labelbee/lb-utils"),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(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,o,n)=>o in e?__defProp(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,__spreadValues=(e,o)=>{for(var n in o||(o={}))__hasOwnProp.call(o,n)&&__defNormalProp(e,n,o[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(o))__propIsEnum.call(o,n)&&__defNormalProp(e,n,o[n]);return e},__spreadProps=(e,o)=>__defProps(e,__getOwnPropDescs(o));const{EPolygonPattern}=lbAnnotation.cTool,TransferCanvas2WorldOffset=(e,o,n=1)=>{const{width:c,height:p}=o,g={x:e.x+c*n/2,y:e.y+p*n/2},f={x:o.width/2,y:o.height/2};return{offsetX:(f.x-g.x)/n,offsetY:-(f.y-g.y)/n}},TopViewToolbar=({currentData:e})=>{const{zoom:o,zoomIn:n,zoomOut:c,initialPosition:p}=useZoom.useZoom(),{selectNextBox:g,selectPrevBox:f}=useSingleBox.useSingleBox(),{updateRotate:u}=useRotate.useRotate({currentData:e}),t=2,s=()=>{u(-t)},v=()=>{u(t)},w=()=>{u(180)};return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement("span",{onClick:v,className:dom.getClassName("point-cloud","rotate-reserve")}),React__default.default.createElement("span",{onClick:s,className:dom.getClassName("point-cloud","rotate")}),React__default.default.createElement("span",{onClick:w,className:dom.getClassName("point-cloud","rotate-180")}),React__default.default.createElement(index$1.FooterDivider,null),React__default.default.createElement(icons.UpSquareOutlined,{onClick:()=>{f()},className:dom.getClassName("point-cloud","prev")}),React__default.default.createElement(icons.DownSquareOutlined,{onClick:()=>{g()},className:dom.getClassName("point-cloud","next")}),React__default.default.createElement(index$1.FooterDivider,null),React__default.default.createElement(index$2.ZoomController,{initialPosition:p,zoomIn:n,zoomOut:c,zoom:o}))},ZAxisSlider=({setZAxisLimit:e,zAxisLimit:o,checkMode:n})=>n?null: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:o,onAfterChange:c=>{e(c)}})),PointCloudTopView=({currentData:e,imgList:o,stepInfo:n,drawLayerSlot:c,checkMode:p})=>{const[g,f]=React.useState({zoom:1,currentPos:{x:0,y:0}}),u=React.useRef(null),t=React__default.default.useContext(PointCloudContext.PointCloudContext),s=useSize(u),v=index.jsonParser(n.config),{setZoom:w}=useZoom.useZoom(),{addPolygon:_,deletePolygon:
|
|
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"),lbUtils=require("@labelbee/lb-utils"),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(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,o,n)=>o in e?__defProp(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,__spreadValues=(e,o)=>{for(var n in o||(o={}))__hasOwnProp.call(o,n)&&__defNormalProp(e,n,o[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(o))__propIsEnum.call(o,n)&&__defNormalProp(e,n,o[n]);return e},__spreadProps=(e,o)=>__defProps(e,__getOwnPropDescs(o));const{EPolygonPattern}=lbAnnotation.cTool,TransferCanvas2WorldOffset=(e,o,n=1)=>{const{width:c,height:p}=o,g={x:e.x+c*n/2,y:e.y+p*n/2},f={x:o.width/2,y:o.height/2};return{offsetX:(f.x-g.x)/n,offsetY:-(f.y-g.y)/n}},TopViewToolbar=({currentData:e})=>{const{zoom:o,zoomIn:n,zoomOut:c,initialPosition:p}=useZoom.useZoom(),{selectNextBox:g,selectPrevBox:f}=useSingleBox.useSingleBox(),{updateRotate:u}=useRotate.useRotate({currentData:e}),t=2,s=()=>{u(-t)},v=()=>{u(t)},w=()=>{u(180)};return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement("span",{onClick:v,className:dom.getClassName("point-cloud","rotate-reserve")}),React__default.default.createElement("span",{onClick:s,className:dom.getClassName("point-cloud","rotate")}),React__default.default.createElement("span",{onClick:w,className:dom.getClassName("point-cloud","rotate-180")}),React__default.default.createElement(index$1.FooterDivider,null),React__default.default.createElement(icons.UpSquareOutlined,{onClick:()=>{f()},className:dom.getClassName("point-cloud","prev")}),React__default.default.createElement(icons.DownSquareOutlined,{onClick:()=>{g()},className:dom.getClassName("point-cloud","next")}),React__default.default.createElement(index$1.FooterDivider,null),React__default.default.createElement(index$2.ZoomController,{initialPosition:p,zoomIn:n,zoomOut:c,zoom:o}))},ZAxisSlider=({setZAxisLimit:e,zAxisLimit:o,checkMode:n})=>n?null: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:o,onAfterChange:c=>{e(c)}})),PointCloudTopView=({currentData:e,imgList:o,stepInfo:n,drawLayerSlot:c,checkMode:p})=>{const[g,f]=React.useState({zoom:1,currentPos:{x:0,y:0}}),u=React.useRef(null),t=React__default.default.useContext(PointCloudContext.PointCloudContext),s=useSize(u),v=index.jsonParser(n.config),{setZoom:w}=useZoom.useZoom(),{hideAttributes:b}=t,{addPolygon:_,deletePolygon:E}=usePolygon.usePolygon(),{deletePointCloudBox:q,changeValidByID:j}=useSingleBox.useSingleBox(),[x,S]=React.useState(10),{t:A}=reactI18next.useTranslation(),P=usePointCloudViews.usePointCloudViews();return React.useLayoutEffect(()=>{if(!t.topViewInstance&&u.current&&(e==null?void 0:e.url)&&(e==null?void 0:e.result)){const l={width:u.current.clientWidth,height:u.current.clientHeight},d=new lbAnnotation.PointCloudAnnotation({container:u.current,size:l,pcdPath:e.url,config:v,checkMode:p});t.setTopViewInstance(d)}},[e]),React.useEffect(()=>{if(!s||!t.topViewInstance||!t.sideViewInstance)return;const{pointCloud2dOperation:l}=t.topViewInstance;l.singleOn("polygonCreated",(i,a)=>{if(l.pattern===EPolygonPattern.Normal||!(e==null?void 0:e.url)){const m=__spreadProps(__spreadValues({},i),{pointList:i.pointList.map(r=>lbUtils.PointCloudUtils.transferCanvas2World(r,s))});_(m),t.setSelectedIDs(b.includes(i.attribute)?"":i.id);return}P.topViewAddBox({newPolygon:i,size:s,imgList:o,trackConfigurable:v.trackConfigurable,zoom:a})}),l.singleOn("deletedObject",({id:i})=>{q(i),E(i)}),l.singleOn("deleteSelectedIDs",()=>{t.setSelectedIDs([])}),l.singleOn("addSelectedIDs",i=>{t.addSelectedID(i)}),l.singleOn("setSelectedIDs",i=>{t.setSelectedIDs(i)}),l.singleOn("updatePolygonByDrag",i=>{var a;(a=P.topViewUpdateBox)==null||a.call(P,i,s)});const d=i=>{var a;const m=j(i);m&&t.syncAllViewPointCloudColor(m),t.polygonList.find(r=>r.id===i)&&((a=t.topViewInstance)==null||a.pointCloud2dOperation.setPolygonValidAndRender(i,!0))};return l.on("validUpdate",d),()=>{l.unbind("validUpdate",d)}},[t,s,e,P,t.polygonList]),React.useEffect(()=>{var l,d;if(!(s==null?void 0:s.width)||!t.topViewInstance)return;const i=(d=(l=v==null?void 0:v.attributeList)==null?void 0:l[0])==null?void 0:d.value;i&&t.topViewInstance.pointCloud2dOperation.setDefaultAttribute(i),t.topViewInstance.initSize(s),t.topViewInstance.updatePolygonList(t.displayPointCloudList,t.polygonList);const{topViewInstance:{pointCloudInstance:a,pointCloud2dOperation:m}}=t;m.singleOn("renderZoom",(r,C)=>{const{offsetX:y,offsetY:V}=TransferCanvas2WorldOffset(C,s,r);if(a.camera.zoom=r,C){const{x:I,y:O,z:h}=a.initCameraPosition;a.camera.position.set(I+V,O-y,h)}a.camera.updateProjectionMatrix(),a.render(),w(r),f({zoom:r,currentPos:C})}),m.singleOn("dragMove",({currentPos:r,zoom:C})=>{const{offsetX:y,offsetY:V}=TransferCanvas2WorldOffset(r,s,C);a.camera.zoom=C;const{x:I,y:O,z:h}=a.initCameraPosition;a.camera.position.set(I+V,O-y,h),a.render(),f({zoom:C,currentPos:r})})},[s,t.topViewInstance]),React.useEffect(()=>{var l,d;(d=(l=t.topViewInstance)==null?void 0:l.pointCloudInstance)==null||d.applyZAxisPoints(x)},[x]),React.useEffect(()=>{P.topViewSelectedChanged()},[t.selectedIDs]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","top-view"),title:A("TopView"),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:u},c==null?void 0:c(g)),React__default.default.createElement(PointCloudInfos.BoxInfos,{checkMode:p,config:v}),React__default.default.createElement(ZAxisSlider,{checkMode:p,zAxisLimit:x,setZAxisLimit:S}),React__default.default.createElement(PointCloudInfos.PointCloudValidity,null)))};var PointCloudTopView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudTopView);module.exports=PointCloudTopView$1;
|
|
@@ -1 +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"),reactI18next=require("react-i18next");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var ___default=_interopDefaultLegacy(_);const useBoxes=({config:t})=>{const{selectedIDs:l,pointCloudBoxList:
|
|
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"),reactI18next=require("react-i18next");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var ___default=_interopDefaultLegacy(_);const useBoxes=({config:t})=>{const{selectedIDs:l,pointCloudBoxList:c,displayPointCloudList:s,setPointCloudResult:p,syncAllViewPointCloudColor:f}=React.useContext(PointCloudContext.PointCloudContext),[o,a]=React.useState([]),{pointCloudBoxListUpdated:d}=usePointCloudViews.usePointCloudViews(),{t:r,i18n:C}=reactI18next.useTranslation(),x=n=>t.trackConfigurable!==!0?!1:c.some(u=>n.some(e=>e.trackID===u.trackID)),i=React.useMemo(()=>s.filter(n=>l.includes(n.id)),[l,s]),D=React.useCallback(()=>{i.length>0?a(___default.default.cloneDeep(i)):(a([]),antd.message.error(r("CopyEmptyInPointCloud")))},[l,s,C.language]),P=React.useCallback(()=>{if(o.length===0){antd.message.error(r("PasteEmptyInPointCloud"));return}const n=x(o),u=e=>{p(e),d==null||d(e),a([]),f(e)};if(n)antd.Modal.confirm({title:r("HasDuplicateIDHeader"),content:r("HasDuplicateIDMsg"),onOk:()=>{const e=c.filter(g=>!o.find(I=>I.trackID===g.trackID)).concat(o);u(e)}});else{const e=[...s,...o];u(e)}},[o,s,C.language]);return{copySelectedBoxes:D,pasteSelectedBoxes:P,copiedBoxes:o,selectedBoxes:i}};exports.useBoxes=useBoxes;
|
|
@@ -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"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("../PointCloudContext.js"),useSingleBox=require("./useSingleBox.js"),ctx=require("../../../store/ctx.js"),StepUtils=require("../../../utils/StepUtils.js"),index=require("../../../utils/index.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),antd=require("antd"),reactI18next=require("react-i18next"),useHistory=require("./useHistory.js"),usePolygon=require("./usePolygon.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,o,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((d,e)=>{var s=l=>{try{c(i.next(l))}catch(h){e(h)}},g=l=>{try{c(i.throw(l))}catch(h){e(h)}},c=l=>l.done?d(l.value):Promise.resolve(l.value).then(s,g);c((i=i.apply(t,o)).next())});const DEFAULT_SCOPE=5,DEFAULT_RADIUS=90,PointCloudView={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},topViewPolygon2PointCloud=(t,o,i,d,e)=>{const[s,g,c,l]=t.pointList.map(P=>lbUtils.PointCloudUtils.transferCanvas2World(P,o)),h=lbAnnotation.MathUtils.getLineCenterPoint([s,c]),f=lbAnnotation.MathUtils.getLineLength(s,g),v=lbAnnotation.MathUtils.getLineLength(g,c),V=lbAnnotation.MathUtils.getRadiusFromQuadrangle(t.pointList);let w=0,m=1,B={};if(i){const P=i.getSensesPointZAxisInPolygon([s,g,c,l]);w=(P.maxZ+P.minZ)/2,m=P.maxZ-P.minZ,B={count:P.zCount}}d&&(w=d.center.z,m=d.depth);const U={center:{x:h.x,y:h.y,z:w},width:v,height:f,depth:m,rotation:V,id:t.id},C=__spreadValues(d?__spreadValues(__spreadValues({},d),U):__spreadProps(__spreadValues({},U),{attribute:"",valid:!0}),B);return e&&Object.assign(C,e),C},sideViewPolygon2PointCloud=(t,o,i,d)=>{const[e,s,g]=t.pointList,[c,l,h]=o.pointList,f=lbAnnotation.MathUtils.getLineCenterPoint([e,g]),v=lbAnnotation.MathUtils.getLineCenterPoint([c,h]),w={x:{x:f.x-v.x,y:f.y-v.y}.x,y:0,z:f.y-v.y},m=lbAnnotation.MathUtils.getLineLength(e,s),B=lbAnnotation.MathUtils.getLineLength(c,l),U=m-B,C=lbAnnotation.MathUtils.getLineLength(s,g),P=lbAnnotation.MathUtils.getLineLength(l,h),D=C-P,{newBoxParams:b}=d.getNewBoxBySideUpdate(w,D,U,i);return b},backViewPolygon2PointCloud=(t,o,i,d)=>{const[e,s,g]=t.pointList,[c,l,h]=o.pointList,f=lbAnnotation.MathUtils.getLineCenterPoint([e,g]),v=lbAnnotation.MathUtils.getLineCenterPoint([c,h]),w={x:{x:f.x-v.x,y:f.y-v.y}.x,y:0,z:f.y-v.y},m=lbAnnotation.MathUtils.getLineLength(e,s),B=lbAnnotation.MathUtils.getLineLength(c,l),U=m-B,C=lbAnnotation.MathUtils.getLineLength(s,g),P=lbAnnotation.MathUtils.getLineLength(l,h),D=C-P;let{newBoxParams:b}=d.getNewBoxByBackUpdate(w,D,U,i);return b},synchronizeSideView=(t,o,i,d)=>{if(!i)return;const{pointCloud2dOperation:e,pointCloudInstance:s}=i;s.loadPCDFileByBox(d,t,{width:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:g}=s.updateOrthoCamera(t,lbUtils.EPerspectiveView.Left);s.setInitCameraPosition(g);const{polygon2d:c,zoom:l}=s.getBoxSidePolygon2DCoordinate(t);s.camera.zoom=l,s.camera.updateProjectionMatrix(),s.render(),e.initPosition(),e.zoomChangeOnCenter(l),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:c,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},synchronizeBackView=(t,o,i,d)=>{if(!i)return;const{pointCloud2dOperation:e,pointCloudInstance:s}=i;s.loadPCDFileByBox(d,t,{height:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:g}=s.updateOrthoCamera(t,lbUtils.EPerspectiveView.Back);s.setInitCameraPosition(g);const{polygon2d:c,zoom:l}=s.getBoxBackPolygon2DCoordinate(t);s.camera.zoom=l,s.camera.updateProjectionMatrix(),s.render(),e.initPosition(),e.zoomChangeOnCenter(l),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:c,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},synchronizeTopView=(t,o,i,d)=>{var e;if(!i||!d)return;d.generateBox(t,o.id),d.updateCameraByBox(t,lbUtils.EPerspectiveView.Top),d.render();const{pointCloud2dOperation:s,pointCloudInstance:g}=i,{polygon2d:c}=g.getBoxTopPolygon2DCoordinate(t),l=[...s.polygonList],h=l.find(f=>f.id===o.id);h?h.pointList=c:l.push({id:o.id,pointList:c,textAttribute:"",isRect:!0,valid:(e=t.valid)!=null?e:!0}),s.setResultAndSelectedID(l,o.id)},usePointCloudViews=()=>{const t=React.useContext(PointCloudContext.PointCloudContext),{topViewInstance:o,sideViewInstance:i,backViewInstance:d,mainViewInstance:e,addPointCloudBox:s,setSelectedIDs:g,selectedIDs:c,pointCloudBoxList:l,hideAttributes:h}=t,{addHistory:f,initHistory:v,pushHistoryUnderUpdatePolygon:V}=useHistory.useHistory(),{selectedPolygon:w}=usePolygon.usePolygon(),{updateSelectedBox:m,updateSelectedBoxes:B,getPointCloudByID:U}=useSingleBox.useSingleBox(),{currentData:C,config:P}=ctx.useSelector(n=>{const{stepList:u,step:p,imgList:r,imgIndex:a}=n.annotation;return{currentData:r[a],config:index.jsonParser(StepUtils.getCurrentStepInfo(p,u).config)}}),D=ctx.useDispatch(),{selectedBox:b}=useSingleBox.useSingleBox(),{t:A}=reactI18next.useTranslation(),I=b==null?void 0:b.info;if(!o||!i||!d)return{topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{},backViewUpdateBox:()=>{}};const{pointCloudInstance:k}=o,M=n=>{e==null||e.generateBox(n),e==null||e.controls.update(),e==null||e.render()},T=({newPolygon:n,size:u,imgList:p,trackConfigurable:r,zoom:a})=>{var y;const x={attribute:(y=o.pointCloud2dOperation.defaultAttribute)!=null?y:""};r===!0&&Object.assign(x,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:[],extraBoxList:l})});const L=topViewPolygon2PointCloud(n,u,k,void 0,x),_=o==null?void 0:o.pointCloud2dOperation,S=L;if((P==null?void 0:P.lowerLimitPointsNumInBox)&&typeof L.count=="number"&&L.count<P.lowerLimitPointsNumInBox){antd.message.info(A("LowerLimitPointsNumInBox",{num:P.lowerLimitPointsNumInBox})),_.deletePolygon(L.id);return}const H=h.includes(n.attribute),F=s(S);H?g([]):(g(S.id),_.setSelectedIDs([n.id]),O(PointCloudView.Top,n,S,a,F)),f({newBoxParams:S})},z=(n,u)=>{const p=n!=null?n:b==null?void 0:b.info,r=o==null?void 0:o.pointCloud2dOperation;if(r.setSelectedIDs(c),c.length===0||!r)return;const a=r.selectedPolygon;if(c.length===1&&p){O(PointCloudView.Top,a,p,void 0,u);return}},j=(n,u,p)=>{if(I){let r,a;switch(p){case PointCloudView.Back:r=backViewPolygon2PointCloud;break;case PointCloudView.Side:r=sideViewPolygon2PointCloud;break;default:r=sideViewPolygon2PointCloud;break}if(a=r(n,u,I,i.pointCloudInstance),e){const{count:x}=e.getSensesPointZAxisInPolygon(lbAnnotation.getCuboidFromPointCloudBox(a).polygonPointList,[a.center.z-a.depth/2,a.center.z+a.depth/2]);a=__spreadProps(__spreadValues({},a),{count:x})}const y=m(a);return O(p,n,a,void 0,y),y}},R=(n,u)=>{j(n,u,PointCloudView.Side)},q=(n,u)=>{j(n,u,PointCloudView.Back)},E=(n,u)=>{if(w){const r=n[0].newPolygon;r.pointList=r.pointList.map(a=>lbUtils.PointCloudUtils.transferCanvas2World(a,u)),V(n[0].newPolygon);return}const p=n.map(({newPolygon:r})=>{const a=U(r.id);return topViewPolygon2PointCloud(r,u,o.pointCloudInstance,a)});if(p.length===1){const{newPolygon:r}=n[0],a=B(p);O(PointCloudView.Top,r,p[0],void 0,a)}else{const r=B(p);r&&t.syncAllViewPointCloudColor(r)}},O=(n,u,p,r,a)=>__async(void 0,null,function*(){const y=C==null?void 0:C.url;a&&(yield t.syncAllViewPointCloudColor(a));const x={[PointCloudView.Side]:()=>{synchronizeSideView(p,u,i,y)},[PointCloudView.Back]:()=>{d&&synchronizeBackView(p,u,d,y)},[PointCloudView.Top]:()=>{synchronizeTopView(p,u,o,e)}};Object.keys(x).forEach(L=>{L!==n&&x[L]()}),r&&(e==null||e.updateCameraZoom(r)),M(p)});return{topViewAddBox:T,topViewSelectedChanged:z,topViewUpdateBox:E,sideViewUpdateBox:R,backViewUpdateBox:q,pointCloudBoxListUpdated:n=>{o.updatePolygonList(n),e==null||e.generateBoxes(n)},initPointCloud3d:n=>{if(!e)return;const u={left:-n.width/2,right:n.width/2,top:n.height/2,bottom:-n.height/2,near:100,far:-100};e.initOrthographicCamera(u),e.initRenderer(),e.render()},updatePointCloudData:()=>__async(void 0,null,function*(){var n,u,p,r,a,y;if(!(C==null?void 0:C.url)||!e)return;actionCreators.SetPointCloudLoading(D,!0),yield e.loadPCDFile(C.url,(n=P==null?void 0:P.radius)!=null?n:DEFAULT_RADIUS),l.forEach(S=>{e==null||e.removeObjectByName(S.id)});let x=[],L=[];C.result?(x=lbUtils.PointCloudUtils.getBoxParamsFromResultList(C.result),L=lbUtils.PointCloudUtils.getPolygonListFromResultList(C.result),x.forEach(S=>{e==null||e.generateBox(S)}),t.syncAllViewPointCloudColor(x),t.setPointCloudResult(x),t.setPolygonList(L)):(t.setPointCloudResult([]),t.setPolygonList([])),v({pointCloudBoxList:x,polygonList:L}),e.updateTopCamera();const _=(p=(u=index.jsonParser(C.result))==null?void 0:u.valid)!=null?p:!0;t.setPointCloudValid(_),(r=t.sideViewInstance)==null||r.clearAllData(),(a=t.backViewInstance)==null||a.clearAllData(),o.updateData(C.url,C.result,{radius:(y=P==null?void 0:P.radius)!=null?y:DEFAULT_RADIUS}),actionCreators.SetPointCloudLoading(D,!1)})}};exports.synchronizeBackView=synchronizeBackView,exports.synchronizeSideView=synchronizeSideView,exports.synchronizeTopView=synchronizeTopView,exports.topViewPolygon2PointCloud=topViewPolygon2PointCloud,exports.usePointCloudViews=usePointCloudViews;
|
|
@@ -1 +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"),useHistory=require("./useHistory.js"),usePolygon=require("./usePolygon.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),_=require("lodash"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useHistory=require("./useHistory.js"),usePolygon=require("./usePolygon.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,l,n)=>l in e?__defProp(e,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[l]=n,__spreadValues=(e,l)=>{for(var n in l||(l={}))__hasOwnProp.call(l,n)&&__defNormalProp(e,n,l[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(l))__propIsEnum.call(l,n)&&__defNormalProp(e,n,l[n]);return e},__spreadProps=(e,l)=>__defProps(e,__getOwnPropDescs(l));const{ESortDirection}=lbAnnotation.cAnnotation,useSingleBox=()=>{const{pointCloudBoxList:e,setPointCloudResult:l,topViewInstance:n,backViewInstance:P,sideViewInstance:x,selectedIDs:c,selectedID:v,mainViewInstance:s,setSelectedIDs:w,syncAllViewPointCloudColor:y,polygonList:O}=React.useContext(PointCloudContext.PointCloudContext),{selectedPolygon:u,updateSelectedPolygon:I,updatePolygonValidByID:m,deletePolygon:D}=usePolygon.usePolygon(),{pushHistoryWithList:C}=useHistory.useHistory(),d=React.useMemo(()=>{const o=e.findIndex(t=>t.id===v);if(o>-1)return{info:e[o],index:o}},[v,e]),g=React.useCallback(o=>{if(d==null?void 0:d.info){e.splice(d.index,1,___default.default.merge(d.info,o));const t=___default.default.cloneDeep(e);return l(t),C({pointCloudBoxList:t}),t}return e},[v,e]),V=React.useCallback((o,t)=>{const i=e.findIndex(r=>r.id===t);if(i>-1){e.splice(i,1,___default.default.merge(e[i],o));const r=___default.default.cloneDeep(e);return l(r),r}return e},[e]),p=React.useCallback(o=>{n==null||n.pointCloud2dOperation.setPolygonValidAndRender(o,!0),x==null||x.pointCloud2dOperation.setPolygonValidAndRender(o,!0),P==null||P.pointCloud2dOperation.setPolygonValidAndRender(o,!0)},[n,x,P]),h=React.useCallback(()=>{if(d==null?void 0:d.info){const{id:o,valid:t=!0}=d.info,i=g({valid:!t});y(i),p(o)}u&&(I(__spreadProps(__spreadValues({},u),{valid:!u.valid})),n==null||n.pointCloud2dOperation.setPolygonValidAndRender(u.id,!0))},[p,d,u]),L=React.useCallback(o=>{const t=e.find(i=>i.id===o);if(t){const{id:i,valid:r=!0}=t,a=V({valid:!r},i);return p(i),a}m(o)},[p,e,O]),B=React.useCallback((o=ESortDirection.ascend)=>{if(!n||c.length>1)return;const{pointCloud2dOperation:t}=n,i=t.switchToNextPolygon(o);i&&w(i)},[n]),S=()=>{B(ESortDirection.descend)},b=o=>{const t=e.filter(i=>i.id!==o);l(t),s==null||s.removeObjectByName(o),s==null||s.render(),y(t)},j=()=>{d&&(b(d.info.id),n==null||n.pointCloud2dOperation.deletePolygon(d.info.id)),u&&(D(u.id),n==null||n.pointCloud2dOperation.deletePolygon(u.id))},A=React.useMemo(()=>e.filter(o=>c.includes(o.id)),[c,e]),k=React.useCallback(o=>{const t=___default.default.cloneDeep(e);let i=!1;if(o.forEach(r=>{const a=t.findIndex(f=>f.id===r.id);if(a>-1){const f=___default.default.merge(t[a],r);t.splice(a,1,f),s==null||s.generateBox(f),i=!0}}),i)return l(t),C({pointCloudBoxList:t}),s==null||s.render(),t},[c,e]),q=React.useCallback(o=>e.find(t=>t.id===o),[e]);return{selectedBox:d,updateSelectedBox:g,changeSelectedBoxValid:h,changeValidByID:L,selectNextBox:B,selectPrevBox:S,deletePointCloudBox:b,selectedBoxes:A,updateSelectedBoxes:k,getPointCloudByID:q,deleteSelectedPointCloudBoxAndPolygon:j}};exports.useSingleBox=useSingleBox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useHistory=require("./useHistory.js");const{EToolName,EPolygonPattern}=lbAnnotation.cTool,useStatus=()=>{const{topViewInstance:t,mainViewInstance:e,pointCloudBoxList:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useHistory=require("./useHistory.js");const{EToolName,EPolygonPattern}=lbAnnotation.cTool,useStatus=()=>{const{topViewInstance:t,mainViewInstance:e,pointCloudBoxList:i,setPointCloudResult:s,setPolygonList:u,pointCloudPattern:l,setPointCloudPattern:r,syncAllViewPointCloudColor:a}=React.useContext(PointCloudContext.PointCloudContext),{pushHistoryWithList:c}=useHistory.useHistory();return{clearAllResult:()=>{i.forEach(o=>{e==null||e.removeObjectByName(o.id)}),e==null||e.render(),s([]),u([]),t==null||t.pointCloud2dOperation.clearActiveStatus(),t==null||t.pointCloud2dOperation.clearResult(),a([]),c({pointCloudBoxList:[],polygonList:[]})},updatePointCloudPattern:o=>{const n=t==null?void 0:t.pointCloud2dOperation;if(!!n&&(n.clearActiveStatus(),o!==l))switch(o){case EToolName.Rect:n.setPattern(EPolygonPattern.Rect),r(EToolName.Rect);break;case EToolName.Polygon:n.setPattern(EPolygonPattern.Normal),r(EToolName.Polygon);break}},pointCloudPattern:l}};exports.useStatus=useStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PointCloudView=({imgList:e,drawLayerSlot:a,checkMode:t})=>e.length===0?null:React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,{checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),onContextMenu:l=>l.preventDefault()},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-wrapper")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","left")},React__default.default.createElement(PointCloud2DView,null),React__default.default.createElement(PointCloud3DView,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right")},React__default.default.createElement(PointCloudTopView,{drawLayerSlot:a,checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right-bottom")},React__default.default.createElement(PointCloudSideView,
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),index=require("../../views/MainView/toolFooter/AnnotatedAttributes/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PointCloudView=({imgList:e,drawLayerSlot:a,checkMode:t})=>e.length===0?null:React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,{checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),onContextMenu:l=>l.preventDefault()},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-wrapper")},React__default.default.createElement(index.AnnotatedAttributesPanelFixedLeft,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","left")},React__default.default.createElement(PointCloud2DView,null),React__default.default.createElement(PointCloud3DView,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right")},React__default.default.createElement(PointCloudTopView,{drawLayerSlot:a,checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right-bottom")},React__default.default.createElement(PointCloudSideView,null),React__default.default.createElement(PointCloudBackView,null)))),React__default.default.createElement(index.AnnotatedAttributesPanelFixedRight,null)))),mapStateToProps=e=>({imgList:e.annotation.imgList});var PointCloudView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudView);module.exports=PointCloudView$1;
|
package/dist/index.css
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
position: relative;
|
|
22
22
|
z-index: 10;
|
|
23
23
|
border-top: 1px solid #e2e2e2;
|
|
24
|
+
border-left: 1px solid #e2e2e2;
|
|
24
25
|
}
|
|
25
26
|
.bee-layout__side .ant-collapse-borderless > .ant-collapse-item {
|
|
26
27
|
border-bottom: 1px solid #eee;
|
|
@@ -1062,6 +1063,44 @@
|
|
|
1062
1063
|
min-width: 116px;
|
|
1063
1064
|
}
|
|
1064
1065
|
|
|
1066
|
+
.bee-annotated-attribute {
|
|
1067
|
+
width: 240px;
|
|
1068
|
+
background: white;
|
|
1069
|
+
}
|
|
1070
|
+
.bee-annotated-attribute__popover .ant-popover-inner-content {
|
|
1071
|
+
padding: 0;
|
|
1072
|
+
}
|
|
1073
|
+
.bee-annotated-attribute__pin {
|
|
1074
|
+
cursor: pointer;
|
|
1075
|
+
color: #666fff;
|
|
1076
|
+
}
|
|
1077
|
+
.bee-annotated-attribute__pin .anticon {
|
|
1078
|
+
margin-right: 4px;
|
|
1079
|
+
}
|
|
1080
|
+
.bee-annotated-attribute__text {
|
|
1081
|
+
display: flex;
|
|
1082
|
+
justify-content: space-between;
|
|
1083
|
+
padding: 8px 12px;
|
|
1084
|
+
color: #333;
|
|
1085
|
+
}
|
|
1086
|
+
.bee-annotated-attribute__item {
|
|
1087
|
+
height: 40px;
|
|
1088
|
+
line-height: 40px;
|
|
1089
|
+
padding: 12px;
|
|
1090
|
+
display: flex;
|
|
1091
|
+
align-items: center;
|
|
1092
|
+
}
|
|
1093
|
+
.bee-annotated-attribute__item .anticon {
|
|
1094
|
+
cursor: pointer;
|
|
1095
|
+
}
|
|
1096
|
+
.bee-annotated-attribute__item .anticon-eye,
|
|
1097
|
+
.bee-annotated-attribute__item .anticon-caret-down {
|
|
1098
|
+
margin-right: 8px;
|
|
1099
|
+
}
|
|
1100
|
+
.bee-annotated-attribute__item__text {
|
|
1101
|
+
flex: 1;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1065
1104
|
/** VideoPlayer样式 start */
|
|
1066
1105
|
.bee-video-wrapper {
|
|
1067
1106
|
width: 100%;
|
|
@@ -1201,6 +1240,10 @@
|
|
|
1201
1240
|
overflow: hidden;
|
|
1202
1241
|
flex: 1;
|
|
1203
1242
|
}
|
|
1243
|
+
.bee-point-cloud-wrapper .bee-point-cloud-content {
|
|
1244
|
+
flex: 1;
|
|
1245
|
+
display: flex;
|
|
1246
|
+
}
|
|
1204
1247
|
.bee-point-cloud-wrapper .bee-point-cloud-container {
|
|
1205
1248
|
position: relative;
|
|
1206
1249
|
}
|
|
@@ -1299,19 +1342,25 @@
|
|
|
1299
1342
|
flex-direction: column;
|
|
1300
1343
|
justify-content: flex-end;
|
|
1301
1344
|
}
|
|
1302
|
-
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__reset {
|
|
1345
|
+
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__reset, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__followTop {
|
|
1303
1346
|
display: inline-block;
|
|
1304
1347
|
height: 36px;
|
|
1305
1348
|
width: 36px;
|
|
1306
1349
|
background-repeat: no-repeat;
|
|
1307
1350
|
cursor: pointer;
|
|
1308
|
-
background-image: url("../dist/assets/icons/25ef334b.svg");
|
|
1309
|
-
margin: 16px 0;
|
|
1310
1351
|
font-size: 36px;
|
|
1311
1352
|
background-position: center;
|
|
1312
1353
|
background-color: #444;
|
|
1313
1354
|
border-radius: 4px;
|
|
1314
1355
|
}
|
|
1356
|
+
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__reset {
|
|
1357
|
+
background-image: url("../dist/assets/icons/25ef334b.svg");
|
|
1358
|
+
margin: 16px 0;
|
|
1359
|
+
}
|
|
1360
|
+
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__followTop {
|
|
1361
|
+
margin: 16px 0 0 0;
|
|
1362
|
+
background-image: url("../dist/assets/icons/bcc2b407.svg");
|
|
1363
|
+
}
|
|
1315
1364
|
.bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__top, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__front, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__left, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__right, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__back, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__bottom, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__lft, .bee-point-cloud-wrapper .bee-point-cloud-container__left .bee-point-cloud-3d-container .bee-point-cloud-3d-content .bee-point-cloud-3d-sidebar .bee-point-cloud-3d-view__rbt {
|
|
1316
1365
|
display: inline-block;
|
|
1317
1366
|
height: 36px;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("../../utils/index.js"),reducer=require("./reducer.js");const stepConfigSelector=({annotation:r})=>{var e;const{stepList:t,step:s}=r;return index.jsonParser((e=reducer.getStepConfig(t,s))==null?void 0:e.config)};exports.stepConfigSelector=stepConfigSelector;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IPointCloudBox, IPointCloudBoxList, IPolygonData } from '@labelbee/lb-utils';
|
|
2
|
-
import { PointCloud, PointCloudAnnotation, ActionsHistory, EToolName } from '@labelbee/lb-annotation';
|
|
3
2
|
import React from 'react';
|
|
3
|
+
import { PointCloud, PointCloudAnnotation, ActionsHistory, EToolName } from '@labelbee/lb-annotation';
|
|
4
4
|
interface IPointCloudContextInstances {
|
|
5
5
|
topViewInstance?: PointCloudAnnotation;
|
|
6
6
|
sideViewInstance?: PointCloudAnnotation;
|
|
@@ -11,8 +11,10 @@ interface IPointCloudContextInstances {
|
|
|
11
11
|
setBackViewInstance: (instance: PointCloudAnnotation) => void;
|
|
12
12
|
setMainViewInstance: (instance: PointCloud) => void;
|
|
13
13
|
}
|
|
14
|
+
declare type AttrPanelLayout = '' | 'left' | 'right';
|
|
14
15
|
export interface IPointCloudContext extends IPointCloudContextInstances {
|
|
15
16
|
pointCloudBoxList: IPointCloudBoxList;
|
|
17
|
+
displayPointCloudList: IPointCloudBoxList;
|
|
16
18
|
selectedIDs: string[];
|
|
17
19
|
setSelectedIDs: (ids?: string[] | string) => void;
|
|
18
20
|
valid: boolean;
|
|
@@ -28,6 +30,11 @@ export interface IPointCloudContext extends IPointCloudContextInstances {
|
|
|
28
30
|
zoom: number;
|
|
29
31
|
setZoom: (zoom: number) => void;
|
|
30
32
|
history: ActionsHistory;
|
|
33
|
+
hideAttributes: string[];
|
|
34
|
+
toggleAttributesVisible: (attribute: string) => void;
|
|
35
|
+
reRender: (_displayPointCloudList: IPointCloudBoxList, _polygonList: IPolygonData[]) => void;
|
|
36
|
+
attrPanelLayout: AttrPanelLayout;
|
|
37
|
+
setAttrPanelLayout: (layout: AttrPanelLayout) => void;
|
|
31
38
|
syncAllViewPointCloudColor: (newPointCloudList?: IPointCloudBox[]) => void;
|
|
32
39
|
defaultAttribute: string;
|
|
33
40
|
setDefaultAttribute: (defaultAttribute: string) => void;
|
|
@@ -4,22 +4,9 @@
|
|
|
4
4
|
* @createdate 2022-08-17
|
|
5
5
|
*/
|
|
6
6
|
import { PointCloudAnnotation, PointCloud } from '@labelbee/lb-annotation';
|
|
7
|
-
import { IPointCloudBox,
|
|
7
|
+
import { IPointCloudBox, UpdatePolygonByDragList } from '@labelbee/lb-utils';
|
|
8
8
|
import { ISize } from '@/types/main';
|
|
9
9
|
import { IFileItem } from '@/types/data';
|
|
10
|
-
/**
|
|
11
|
-
* Get the coordinate from canvas2d-coordinate to world coordinate
|
|
12
|
-
*/
|
|
13
|
-
export declare const transferCanvas2World: (currentPos: {
|
|
14
|
-
x: number;
|
|
15
|
-
y: number;
|
|
16
|
-
}, size: {
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
}) => {
|
|
20
|
-
x: number;
|
|
21
|
-
y: number;
|
|
22
|
-
};
|
|
23
10
|
export declare const topViewPolygon2PointCloud: (newPolygon: any, size: ISize, pointCloud?: PointCloud, selectedPointCloudBox?: IPointCloudBox, defaultValue?: {
|
|
24
11
|
[v: string]: any;
|
|
25
12
|
} | undefined) => Omit<IPointCloudBox, "trackID">;
|
|
@@ -45,8 +32,8 @@ export declare const usePointCloudViews: () => {
|
|
|
45
32
|
topViewAddBox: () => void;
|
|
46
33
|
topViewSelectedChanged: () => void;
|
|
47
34
|
sideViewUpdateBox: () => void;
|
|
35
|
+
backViewUpdateBox: () => void;
|
|
48
36
|
topViewUpdateBox?: undefined;
|
|
49
|
-
backViewUpdateBox?: undefined;
|
|
50
37
|
pointCloudBoxListUpdated?: undefined;
|
|
51
38
|
initPointCloud3d?: undefined;
|
|
52
39
|
updatePointCloudData?: undefined;
|
|
@@ -59,7 +46,7 @@ export declare const usePointCloudViews: () => {
|
|
|
59
46
|
zoom: number;
|
|
60
47
|
}) => void;
|
|
61
48
|
topViewSelectedChanged: (newSelectedBox?: IPointCloudBox, newPointCloudList?: IPointCloudBox[]) => void;
|
|
62
|
-
topViewUpdateBox: (
|
|
49
|
+
topViewUpdateBox: (updateList: UpdatePolygonByDragList, size: ISize) => void;
|
|
63
50
|
sideViewUpdateBox: (newPolygon: any, originPolygon: any) => void;
|
|
64
51
|
backViewUpdateBox: (newPolygon: any, originPolygon: any) => void;
|
|
65
52
|
pointCloudBoxListUpdated: (newBoxes: IPointCloudBox[]) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPointCloudBox } from '@labelbee/lb-utils';
|
|
1
|
+
import { IPointCloudBox, PartialIPointCloudBoxList } from '@labelbee/lb-utils';
|
|
2
2
|
/** Actions for single selected box */
|
|
3
3
|
export declare const useSingleBox: () => {
|
|
4
4
|
selectedBox: {
|
|
@@ -11,5 +11,8 @@ export declare const useSingleBox: () => {
|
|
|
11
11
|
selectNextBox: (sort?: any) => void;
|
|
12
12
|
selectPrevBox: () => void;
|
|
13
13
|
deletePointCloudBox: (id: string) => void;
|
|
14
|
+
selectedBoxes: IPointCloudBox[];
|
|
15
|
+
updateSelectedBoxes: (updateList: PartialIPointCloudBoxList) => import("@labelbee/lb-utils").IPointCloudBoxList | undefined;
|
|
16
|
+
getPointCloudByID: (id: string) => IPointCloudBox | undefined;
|
|
14
17
|
deleteSelectedPointCloudBoxAndPolygon: () => void;
|
|
15
18
|
};
|