Skip to content

Commit

Permalink
Merge pull request #530 from sharefe-demo/feat_alpha/revert-pr526
Browse files Browse the repository at this point in the history
fix: Revert #526
  • Loading branch information
lihqi authored Aug 2, 2024
2 parents d26c9a6 + 5acbf07 commit 652988a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,11 @@ class PointCloud2DRectOperation extends RectOperation {
return true;
}

private getComputedDrawingRect(rect: IPointCloud2DRectOperationViewRect & IRect) {
const keyOfExtId = 'extId';
// Is it 3d's projected or disconnected 3d's projected rect
// @ts-ignore
const shouldNotDashedLine = rect?.boxID || rect?.[keyOfExtId];

return shouldNotDashedLine ? rect : { ...rect, lineDash: [3] };
}

public renderDrawingRect(rect: IPointCloud2DRectOperationViewRect & IRect, zoom = this.zoom, isZoom = false) {
const targetRect = this.getComputedDrawingRect(rect);
// window.console.log('[@DrawingRect] Rect: ', targetRect, ', Origin Rect: ', rect);
// 是否使用强制默认值,如: lineDash: [3]
const shouldNotUseForceValue = rect?.boxID || rect?.lineDash;

super.renderDrawingRect(targetRect, zoom, isZoom);
super.renderDrawingRect(shouldNotUseForceValue ? rect : { ...rect, lineDash: [3] }, zoom, isZoom);
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ export const PointCloudProvider: React.FC<PropsWithChildren<{}>> = ({ children }
attribute: attribute,
order: trackID,
extId: id,
lineDash: [],
};
}

Expand Down

0 comments on commit 652988a

Please sign in to comment.