From c9b725f74d223079896f7f88c1b9855ff8e49042 Mon Sep 17 00:00:00 2001 From: brausjonas Date: Fri, 7 Jul 2023 00:31:23 +0200 Subject: [PATCH] Push --- src/App.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index dd3a065..ca0ff1a 100644 --- a/src/App.js +++ b/src/App.js @@ -157,6 +157,14 @@ export default function App() { let mouseX = e.pageX let mouseY = e.pageY + if (selectedTool === "pencil" || selectedTool === "eraser") { + hintContext.clearRect(0, 0, 5000, 3000) + hintContext.beginPath() + hintContext.fillStyle = colorValue + hintContext.arc(mouseX, mouseY, strokeWidthSliderValue, 0, 2 * Math.PI, false) + hintContext.fill() + } + if (mouseDownMenuBar) { setMenuBarLeft(mouseX - mouseMenuBarOffsetX) @@ -238,7 +246,7 @@ export default function App() { return (
handleMouseMove(e)} style={{overflow: "unset"}}> - { @@ -477,7 +485,7 @@ export default function App() {
- { + { setStrokeWidthSliderValue(e.currentTarget.value) strokeWidth = e.currentTarget.value if (selectedTool === "pencil") {