Hide the hover magnifier while dragging a card to arrange.

This commit is contained in:
Greyson Parrelli
2026-07-23 08:37:16 -04:00
parent 169b21d6a8
commit 3821469c61
3 changed files with 16 additions and 5 deletions
+5 -1
View File
@@ -15,6 +15,9 @@ interface Props {
dead?: boolean
// preview marks the floating magnified copy so it doesn't magnify itself.
preview?: boolean
// noMagnify suppresses the hover magnifier (e.g. while this card is being
// dragged, so the frozen preview copy doesn't linger over the drag ghost).
noMagnify?: boolean
}
// CardView renders one physical card: pets get a power badge and a colored
@@ -30,6 +33,7 @@ export function CardView({
damage = 0,
dead,
preview,
noMagnify,
}: Props) {
// Hover magnifier: show a large floating copy beside the cursor. The
// preview copy itself opts out so it can't recurse.
@@ -49,7 +53,7 @@ export function CardView({
// Place the magnified preview near the cursor, clamped into the viewport.
const previewEl =
hover && !preview
hover && !preview && !noMagnify
? createPortal(
<div
className="card-magnify"