Update App.js

This commit is contained in:
brausjonas
2023-07-07 00:20:55 +02:00
parent 63f0cc183a
commit 092056b3ad
+4
View File
@@ -82,6 +82,7 @@ export default function App() {
}
function handleMouseDownCanvas(e) {
if(e.button === 0) {
mouseDownCanvas = true
hintContext.clearRect(0, 0, 5000, 3000)
setShowTextInput(false)
@@ -108,8 +109,10 @@ export default function App() {
hintContext.fill()
}
}
}
function handleMouseUpCanvas(e) {
if(e.button === 0) {
mouseDownCanvas = false
if (selectedTool === "rect") {
@@ -148,6 +151,7 @@ export default function App() {
textInput.focus()
}
}
}
function handleMouseMove(e) {
let mouseX = e.pageX