diff --git a/src/components/controlPanel/ControlPanel.js b/src/components/controlPanel/ControlPanel.js index c57c732..aaca59c 100644 --- a/src/components/controlPanel/ControlPanel.js +++ b/src/components/controlPanel/ControlPanel.js @@ -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 diff --git a/src/components/three/Viewer.js b/src/components/three/Viewer.js index 1f944c8..b3cf716 100644 --- a/src/components/three/Viewer.js +++ b/src/components/three/Viewer.js @@ -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)) }