@labelbee/lb-components 1.7.0-alpha.8 → 1.7.0
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.
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import StepUtils from '../../../utils/StepUtils.js';
|
|
1
|
+
import { PointCloudContext } from '../PointCloudContext.js';
|
|
2
|
+
import { useContext } from 'react';
|
|
4
3
|
|
|
5
4
|
const useConfig = () => {
|
|
6
|
-
const {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
5
|
+
const {topViewInstance, sideViewInstance, backViewInstance, mainViewInstance} = useContext(PointCloudContext);
|
|
6
|
+
const syncAllViewsConfig = (config) => {
|
|
7
|
+
[topViewInstance, sideViewInstance, backViewInstance].forEach((instance) => {
|
|
8
|
+
instance == null ? void 0 : instance.updateConfig(config);
|
|
9
|
+
});
|
|
10
|
+
mainViewInstance == null ? void 0 : mainViewInstance.setConfig(config);
|
|
11
|
+
};
|
|
12
|
+
const reRenderTopViewRange = (radius) => {
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
(_b = (_a = topViewInstance == null ? void 0 : topViewInstance.pointCloudInstance) == null ? void 0 : _a.generateRange) == null ? void 0 : _b.call(_a, radius);
|
|
15
|
+
(_c = topViewInstance == null ? void 0 : topViewInstance.pointCloudInstance) == null ? void 0 : _c.render();
|
|
16
|
+
};
|
|
13
17
|
return {
|
|
14
|
-
|
|
18
|
+
syncAllViewsConfig,
|
|
19
|
+
reRenderTopViewRange
|
|
15
20
|
};
|
|
16
21
|
};
|
|
17
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfig.js","sources":["../../../../src/components/pointCloudView/hooks/useConfig.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"useConfig.js","sources":["../../../../src/components/pointCloudView/hooks/useConfig.ts"],"sourcesContent":["import { PointCloudContext } from '../PointCloudContext';\nimport { useContext } from 'react';\nimport { IPointCloudConfig } from '@labelbee/lb-utils';\n\nexport const useConfig = () => {\n const { topViewInstance, sideViewInstance, backViewInstance, mainViewInstance } =\n useContext(PointCloudContext);\n\n const syncAllViewsConfig = (config: IPointCloudConfig) => {\n [topViewInstance, sideViewInstance, backViewInstance].forEach((instance) => {\n instance?.updateConfig(config);\n });\n mainViewInstance?.setConfig(config);\n };\n \n const reRenderTopViewRange = (radius: number) => {\n topViewInstance?.pointCloudInstance?.generateRange?.(radius);\n topViewInstance?.pointCloudInstance?.render();\n }\n\n return {\n syncAllViewsConfig,\n reRenderTopViewRange,\n };\n};\n"],"names":[],"mappings":";;;AAIO,MAAM,YAAY,MAAM;AAC7B,EAAA,MAAM,CAAE,eAAA,EAAiB,gBAAkB,EAAA,gBAAA,EAAkB,oBAC3D,UAAW,CAAA,iBAAA,CAAA,CAAA;AAEb,EAAM,MAAA,kBAAA,GAAqB,CAAC,MAA8B,KAAA;AACxD,IAAA,CAAC,eAAiB,EAAA,gBAAA,EAAkB,gBAAkB,CAAA,CAAA,OAAA,CAAQ,CAAC,QAAa,KAAA;AAC1E,MAAA,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAU,YAAa,CAAA,MAAA,CAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAEzB,IAAA,gBAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,gBAAA,CAAkB,SAAU,CAAA,MAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAG9B,EAAM,MAAA,oBAAA,GAAuB,CAAC,MAAmB,KAAA;AAfnD,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAgBI,IAAiB,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,eAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,eAAA,CAAA,kBAAA,KAAjB,IAAqC,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,aAAA,KAArC,IAAqD,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,EAAA,MAAA,CAAA,CAAA;AACrD,IAAA,CAAA,EAAA,GAAA,eAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,eAAA,CAAiB,uBAAjB,IAAqC,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,EAAA,CAAA;AAAA,GAAA,CAAA;AAGvC,EAAO,OAAA;AAAA,IACL,kBAAA;AAAA,IACA,oBAAA;AAAA,GAAA,CAAA;AAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@labelbee/lb-components",
|
|
3
|
-
"version": "1.7.0
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Provide a complete library of annotation components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"es": "./es/index.js",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@ant-design/icons": "^4.6.2",
|
|
44
|
-
"@labelbee/lb-annotation": "^1.10.0
|
|
45
|
-
"@labelbee/lb-utils": "^1.4.0
|
|
44
|
+
"@labelbee/lb-annotation": "^1.10.0",
|
|
45
|
+
"@labelbee/lb-utils": "^1.4.0",
|
|
46
46
|
"ahooks": "^3.4.0",
|
|
47
47
|
"classnames": "^2.3.0",
|
|
48
48
|
"lodash": "^4.17.21",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"path": "node_modules/cz-conventional-changelog"
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "5ebd31fbf9f78ad4256737673c32f290845774d2"
|
|
101
101
|
}
|