Update App.js
This commit is contained in:
@@ -82,6 +82,7 @@ export default function App() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleMouseDownCanvas(e) {
|
function handleMouseDownCanvas(e) {
|
||||||
|
if(e.button === 0) {
|
||||||
mouseDownCanvas = true
|
mouseDownCanvas = true
|
||||||
hintContext.clearRect(0, 0, 5000, 3000)
|
hintContext.clearRect(0, 0, 5000, 3000)
|
||||||
setShowTextInput(false)
|
setShowTextInput(false)
|
||||||
@@ -108,8 +109,10 @@ export default function App() {
|
|||||||
hintContext.fill()
|
hintContext.fill()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function handleMouseUpCanvas(e) {
|
function handleMouseUpCanvas(e) {
|
||||||
|
if(e.button === 0) {
|
||||||
mouseDownCanvas = false
|
mouseDownCanvas = false
|
||||||
|
|
||||||
if (selectedTool === "rect") {
|
if (selectedTool === "rect") {
|
||||||
@@ -148,6 +151,7 @@ export default function App() {
|
|||||||
textInput.focus()
|
textInput.focus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function handleMouseMove(e) {
|
function handleMouseMove(e) {
|
||||||
let mouseX = e.pageX
|
let mouseX = e.pageX
|
||||||
|
|||||||
Reference in New Issue
Block a user