Skip to content

Commit

Permalink
fix(state-file-schema): annotation stroke width is optional
Browse files Browse the repository at this point in the history
Avoids breaking backwards session.zip compatibility.
  • Loading branch information
PaulHax committed Oct 12, 2023
1 parent 07ea921 commit 83d775d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/io/state-file/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ const annotationTool = z.object({
id: z.string() as unknown as z.ZodType<ToolID>,
name: z.string(),
color: z.string(),
strokeWidth: z.number(),
strokeWidth: z.number().optional(),
label: z.string().optional(),
labelName: z.string().optional(),
}) satisfies z.ZodType<AnnotationTool>;
Expand Down
2 changes: 1 addition & 1 deletion src/types/annotation-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type AnnotationTool = {
labelName?: string;

color: string;
strokeWidth: number;
strokeWidth?: number;

name: string;

Expand Down

0 comments on commit 83d775d

Please sign in to comment.