()
| 161 | * This should be used if no saved state exists in localStorage. |
| 162 | */ |
| 163 | const 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. |
no test coverage detected