Skip to content

Commit

Permalink
feat(pointcloud): The default color of Box is white
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwin-L committed Feb 20, 2023
1 parent 2920cd3 commit 6bbd1da
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions packages/lb-annotation/src/core/pointCloud/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,16 @@ export class PointCloud {
* @param color
*/
public generateBox(boxParams: IPointCloudBox, color = 0xffffff) {
let newColor = color;
if (this.config?.attributeList && this.config?.attributeList?.length > 0 && boxParams.attribute) {
newColor =
toolStyleConverter.getColorFromConfig(
{ attribute: boxParams.attribute },
{ ...this.config, attributeConfigurable: true },
{},
)?.hex ?? color;
}
const newColor = color;
// Temporarily turn the Box white
// if (this.config?.attributeList && this.config?.attributeList?.length > 0 && boxParams.attribute) {
// newColor =
// toolStyleConverter.getColorFromConfig(
// { attribute: boxParams.attribute },
// { ...this.config, attributeConfigurable: true },
// {},
// )?.hex ?? color;
// }

this.AddBoxToSense(boxParams, newColor);
this.render();
Expand Down

0 comments on commit 6bbd1da

Please sign in to comment.