Update App.js

This commit is contained in:
brausjonas
2023-07-07 12:18:30 +02:00
parent ddb334983c
commit 3c531e31fb
+3 -3
View File
@@ -123,7 +123,7 @@ export default function App() {
}
else {
context.clearRect(formAnchor.x, formAnchor.y, moverWidth, moverHeight)
context.drawImage(hintCanvas, e.pageX - moverWidth + 2, e.pageY - moverHeight + 2, moverWidth - 4, moverHeight - 4, e.pageX - moverWidth, e.pageY - moverHeight, moverWidth, moverHeight)
context.drawImage(hintCanvas, e.pageX - moverWidth + 2, e.pageY - moverHeight + 2, moverWidth - 4, moverHeight - 4, e.pageX - moverWidth + 2, e.pageY - moverHeight + 2, moverWidth - 4, moverHeight - 4)
hintContext.clearRect(0, 0, 5000, 3000)
moverActive = false
mouseDownCanvas = false
@@ -169,14 +169,14 @@ export default function App() {
moverWidth = e.pageX - formAnchor.x
moverHeight = e.pageY - formAnchor.y
}
}
if (selectedTool !== "text" && selectedTool !== "mover") {
if (selectedTool !== "text") {
hintContext.clearRect(0, 0, 5000, 3000)
} else {
textInput.focus()
}
}
}
function handleMouseMove(e) {
let mouseX = e.pageX