diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 9418a69..11fc9de 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -17,7 +17,7 @@ import { Close, Erase, PaintBrushAlt, RainDrop, Redo, Select_01, Undo, Scale, Eyedropper } from "carbon-icons-svelte" import StackPreview from './sections/StackPreview.svelte' import type { Canvas } from './types/canvas' - import { BrushTool, EraserTool, FillTool, PickerTool, type Tool } from './types/tools'; + import { BrushTool, EraserTool, FillTool, PickerTool, type BrushType, type Tool } from './types/tools'; import BrushSize from './components/BrushSize.svelte'; let theme: 'white'|'g10'|'g80'|'g90'|'g100' = 'g90' @@ -41,6 +41,7 @@ let toolPicker = new PickerTool() let currentTool: Tool = toolBrush let brushSize: number = 1 + let brushType: BrushType = 'circle' function swapTool(tool: Tool) { currentTool = tool @@ -110,7 +111,7 @@
{#if currentTool === toolBrush || currentTool === toolErase} - + {/if} @@ -126,7 +127,7 @@ {#each files as file} - + {/each} diff --git a/frontend/src/components/BrushSize.svelte b/frontend/src/components/BrushSize.svelte index f8e5eab..9239843 100644 --- a/frontend/src/components/BrushSize.svelte +++ b/frontend/src/components/BrushSize.svelte @@ -1,9 +1,11 @@ - - +
+ + + + brushType='circle'}/> + brushType='square'}/> + +