Skip to content

Commit

Permalink
Merge pull request #631 from Original-Recipe/fix-fullScreenColorIssue
Browse files Browse the repository at this point in the history
fix: Issues with full screen color and main attributes
  • Loading branch information
lihqi authored Jan 21, 2025
2 parents 752357e + 7b921af commit aaff7fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,15 @@ const PointCloudTopView: React.FC<IProps> = ({
ptCtx.topViewInstance?.toolInstance,
]);

useEffect(() => {
if (!ptCtx.topViewInstance) return;

const defaultAttribute = config?.attributeList?.[0]?.value;
if (defaultAttribute) {
ptCtx.topViewInstance.toolInstance.setDefaultAttribute(defaultAttribute);
}
}, [ptCtx.topViewInstance]);

useEffect(() => {
if (!size?.width || !ptCtx.topViewInstance) {
return;
Expand All @@ -389,11 +398,6 @@ const PointCloudTopView: React.FC<IProps> = ({
*
* 1. Update defaultAttribute by first attribute;
* */
const defaultAttribute = config?.attributeList?.[0]?.value;
if (defaultAttribute) {
ptCtx.topViewInstance.toolInstance.setDefaultAttribute(defaultAttribute);
}

// 1. Update Size
ptCtx.topViewInstance.initSize(size);
ptCtx.topViewInstance.updatePolygonList(ptCtx.displayPointCloudList, ptCtx.polygonList);
Expand Down
2 changes: 1 addition & 1 deletion packages/lb-components/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ $headerHeight: 40px;
}
}
.#{$ptPrefix}-container__left-large{
width: 455px;
width: 100%;
}
.#{$ptPrefix}-container__left-noLarge{
width: 100%;
Expand Down

0 comments on commit aaff7fb

Please sign in to comment.