Skip to content

Commit

Permalink
feat(pointcloud2d): Switch polygon when it has next one
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwin-L committed Aug 30, 2022
1 parent aacbbdd commit 37b964b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,9 @@ class PointCloud2dOperation extends PolygonOperation {
const nextSelectedResult = CommonToolUtils.getNextSelectedRectID(sortList, sort, this.selectedID);
if (nextSelectedResult) {
this.setSelectedIDs([nextSelectedResult.id]);
this.render();
return [nextSelectedResult.id];
}
this.render();

return [nextSelectedResult.id];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export const useSingleBox = () => {
const { pointCloud2dOperation } = topViewInstance;

const newSelectedIDs = pointCloud2dOperation.switchToNextPolygon(sort);
setSelectedIDs(newSelectedIDs);
if (newSelectedIDs) {
setSelectedIDs(newSelectedIDs);
}
},
[topViewInstance],
);
Expand Down

0 comments on commit 37b964b

Please sign in to comment.