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") {