コード function Canvas() { const [mousePressed, setMousePressed] = useState(false); const [mousePos, setMousePos] = useState({ x: 0, y: 0 }); const [origin, setOrigin] = useState({ x: 0, y: 0 }); const [logScale, setLogScale] = useState(0); function translateCanvas(x: number, y: number) { if (mouse…