diff --git a/frontend/apps/editor3d/app/src/pages/PageDraw/components/ui/SideToolbar.tsx b/frontend/apps/editor3d/app/src/pages/PageDraw/components/ui/SideToolbar.tsx index af82759939..c737aca465 100644 --- a/frontend/apps/editor3d/app/src/pages/PageDraw/components/ui/SideToolbar.tsx +++ b/frontend/apps/editor3d/app/src/pages/PageDraw/components/ui/SideToolbar.tsx @@ -23,11 +23,10 @@ import SliderWithIndicator from "./SliderWithIndicator"; import { useSceneStore } from "../../stores/SceneState"; import { Tooltip } from "@storyteller/ui-tooltip"; -/* visual constants */ const shapeIconBtn = "flex h-9 w-9 items-center justify-center rounded-lg transition-colors hover:bg-white/10"; -/* small debounce */ +// Debounce function function useDebounced void, A extends unknown[]>( fn: T, ms = 75, @@ -62,10 +61,8 @@ const SideToolbar: React.FC = ({ activeToolId, className = "", }) => { - /* ------------------------------------------------ state ---------- */ const store = useSceneStore(); const [open, setOpen] = useState(null); - const [brushSize, setBrushSize] = useState(16); const [brushHsva, setBrushHsva] = useState({ h: 120, @@ -73,7 +70,6 @@ const SideToolbar: React.FC = ({ v: 100, a: 1, }); - const [bgHsva, setBgHsva] = useState({ h: 0, s: 0, @@ -151,7 +147,7 @@ const SideToolbar: React.FC = ({ 75, ); - /* picker helper */ + // Picker helper const makePicker = ( hsva: HsvaColor, setHsva: React.Dispatch>, @@ -200,8 +196,7 @@ const SideToolbar: React.FC = ({ const BgPopout = makePicker(bgHsva, setBgHsva, sendBg); const ShapePopout = makePicker(shapeHsva, setShapeHsva, sendShapeColor); - /* ------------------------------------------------ tools ---------- */ - + // Tools const tools = [ { id: "select", @@ -355,7 +350,6 @@ const SideToolbar: React.FC = ({ ? "bg-primary/30 border-2 !border-primary text-white" : "hover:bg-white/10 text-white"; - // Dynamic icon for brush/draw tool let displayIcon = icon; if (id === "draw") { displayIcon = active ? (