Skip to content

Commit aaff7fb

Browse files
authored
Merge pull request #631 from Original-Recipe/fix-fullScreenColorIssue
fix: Issues with full screen color and main attributes
2 parents 752357e + 7b921af commit aaff7fb

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

packages/lb-components/src/components/pointCloudView/PointCloudTopView.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,15 @@ const PointCloudTopView: React.FC<IProps> = ({
380380
ptCtx.topViewInstance?.toolInstance,
381381
]);
382382

383+
useEffect(() => {
384+
if (!ptCtx.topViewInstance) return;
385+
386+
const defaultAttribute = config?.attributeList?.[0]?.value;
387+
if (defaultAttribute) {
388+
ptCtx.topViewInstance.toolInstance.setDefaultAttribute(defaultAttribute);
389+
}
390+
}, [ptCtx.topViewInstance]);
391+
383392
useEffect(() => {
384393
if (!size?.width || !ptCtx.topViewInstance) {
385394
return;
@@ -389,11 +398,6 @@ const PointCloudTopView: React.FC<IProps> = ({
389398
*
390399
* 1. Update defaultAttribute by first attribute;
391400
* */
392-
const defaultAttribute = config?.attributeList?.[0]?.value;
393-
if (defaultAttribute) {
394-
ptCtx.topViewInstance.toolInstance.setDefaultAttribute(defaultAttribute);
395-
}
396-
397401
// 1. Update Size
398402
ptCtx.topViewInstance.initSize(size);
399403
ptCtx.topViewInstance.updatePolygonList(ptCtx.displayPointCloudList, ptCtx.polygonList);

packages/lb-components/src/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ $headerHeight: 40px;
16641664
}
16651665
}
16661666
.#{$ptPrefix}-container__left-large{
1667-
width: 455px;
1667+
width: 100%;
16681668
}
16691669
.#{$ptPrefix}-container__left-noLarge{
16701670
width: 100%;

0 commit comments

Comments
 (0)