Skip to content

Commit

Permalink
feat(pointcloud2d): Update index when page changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwin-L committed Sep 1, 2022
1 parent 6d0b3df commit b808c4d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ const PointCloud2DView = ({ imgInfo }: IProps) => {

const mappingData = imgInfo?.mappingImgList?.[mappingIndex];

useEffect(() => {
setMappingIndex(0);
}, [imgInfo]);

useEffect(() => {
if (topViewInstance && mappingData) {
const { pointCloudInstance } = topViewInstance;
Expand Down Expand Up @@ -95,7 +99,6 @@ const PointCloud2DView = ({ imgInfo }: IProps) => {
return <div />;
}

console.log('render', annotations2d);
return (
<PointCloudContainer
className={getClassName('point-cloud-2d-container')}
Expand Down

0 comments on commit b808c4d

Please sign in to comment.