From 9cc6630a4ba83f4750c2661a8fb0d2b27feb1509 Mon Sep 17 00:00:00 2001 From: brausjonas Date: Fri, 7 Jul 2023 00:45:46 +0200 Subject: [PATCH] Update App.js --- src/App.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/App.js b/src/App.js index 84ef354..db5f8a2 100644 --- a/src/App.js +++ b/src/App.js @@ -229,6 +229,8 @@ export default function App() { } function handleToolChange(e) { + setShowTextInput(false) + hintContext.clearRect(0, 0, 5000, 3000) setSelectedTool(e.target.value) if (e.target.value === "pencil") { setStrokeWidthSliderValue(lastStrokeWidthPencil) @@ -313,6 +315,9 @@ export default function App() { mouseMenuBarOffsetX = e.pageX - e.currentTarget.getBoundingClientRect().left mouseMenuBarOffsetY = e.pageY - e.currentTarget.getBoundingClientRect().top } + + hintContext.clearRect(0, 0, 5000, 3000) + setShowTextInput(false) }} onMouseUp={(e) => { mouseDownMenuBar = false