Skip to content

Commit

Permalink
fix: 渲染添加限制
Browse files Browse the repository at this point in the history
  • Loading branch information
laoluo committed Oct 19, 2021
1 parent 706dd3d commit 6945607
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/lb-annotation/src/utils/tool/DrawUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ export default class DrawUtils {
lineType: ELineTypes;
}> = {},
): void {
if (pointList.length < 2) {
return;
}

const ctx: CanvasRenderingContext2D = canvas.getContext('2d')!;
const { color = DEFAULT_COLOR, lineType = ELineTypes.Line } = options;

Expand Down

0 comments on commit 6945607

Please sign in to comment.