fix error

This commit is contained in:
Haapy
2026-05-14 22:08:14 +00:00
parent fe9f3681fd
commit a858a3415d
3 changed files with 7 additions and 6 deletions

File diff suppressed because one or more lines are too long

2
dist/index.html vendored
View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Infinite</title>
<script type="module" crossorigin src="/assets/index-DYmGrN0R.js"></script>
<script type="module" crossorigin src="/assets/index-CK2X1Wwi.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DDld2teB.css">
</head>
<body>

View File

@@ -80,10 +80,11 @@ export function Canvas({ initialCards }: CanvasProps) {
};
const onPointerMove = (e: React.PointerEvent) => {
if (!panState.current) return;
const dx = e.clientX - panState.current.startX;
const dy = e.clientY - panState.current.startY;
setVp((prev) => ({ ...prev, x: panState.current!.vpX + dx, y: panState.current!.vpY + dy }));
const ps = panState.current;
if (!ps) return;
const newX = ps.vpX + (e.clientX - ps.startX);
const newY = ps.vpY + (e.clientY - ps.startY);
setVp((prev) => ({ ...prev, x: newX, y: newY }));
};
const onPointerUp = (e: React.PointerEvent) => {