MCPcopy Create free account
hub / github.com/Shitanshukumar607/Drawspace / buildInitialProperties

Function buildInitialProperties

context/toolPropertiesStore.ts:163–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161 * This should be used if no saved state exists in localStorage.
162 */
163const buildInitialProperties = (): Partial<{
164 [K in ToolKey]: ToolPropertiesMap[K];
165}> => {
166 return {
167 pen: getDefaultForTool("pen") as PenProperties,
168 eraser: getDefaultForTool("eraser") as EraserProperties,
169 rectangle: getDefaultForTool("rectangle") as RectangleProperties,
170 ellipse: getDefaultForTool("ellipse") as EllipseProperties,
171 line: getDefaultForTool("line") as LineProperties,
172 arrow: getDefaultForTool("arrow") as ArrowProperties,
173 };
174};
175
176/**
177 * Merge existing properties with defaults for a specific tool.

Callers 1

Calls 1

getDefaultForToolFunction · 0.85

Tested by

no test coverage detected