Skip to content

Commit

Permalink
added file input clear
Browse files Browse the repository at this point in the history
  • Loading branch information
maxibenner committed Aug 6, 2021
1 parent 3b7727d commit 478d638
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/controlPanel/ControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export default function ControlPanel() {
const loadDecal = () => {
const path = URL.createObjectURL(inputRef.current.files[0])
setDecalPath(path)

// Clear decal
inputRef.current.value = ""
}

// KEYDOWN
Expand Down
2 changes: 1 addition & 1 deletion src/components/three/Viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Viewer = () => {
useEffect(() => {
function handlekeydownEvent(event) {
const { key } = event
if (!animation) {
if (!animation && !active) {
console.log(animation)
key === "r" && setModelFlipped((prev) => (prev ? false : true))
}
Expand Down

0 comments on commit 478d638

Please sign in to comment.