fix error
This commit is contained in:
File diff suppressed because one or more lines are too long
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Infinite</title>
|
<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">
|
<link rel="stylesheet" crossorigin href="/assets/index-DDld2teB.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -80,10 +80,11 @@ export function Canvas({ initialCards }: CanvasProps) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onPointerMove = (e: React.PointerEvent) => {
|
const onPointerMove = (e: React.PointerEvent) => {
|
||||||
if (!panState.current) return;
|
const ps = panState.current;
|
||||||
const dx = e.clientX - panState.current.startX;
|
if (!ps) return;
|
||||||
const dy = e.clientY - panState.current.startY;
|
const newX = ps.vpX + (e.clientX - ps.startX);
|
||||||
setVp((prev) => ({ ...prev, x: panState.current!.vpX + dx, y: panState.current!.vpY + dy }));
|
const newY = ps.vpY + (e.clientY - ps.startY);
|
||||||
|
setVp((prev) => ({ ...prev, x: newX, y: newY }));
|
||||||
};
|
};
|
||||||
|
|
||||||
const onPointerUp = (e: React.PointerEvent) => {
|
const onPointerUp = (e: React.PointerEvent) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user