feat: gesture-reactive drag overlay with tilt based on pointer velocity
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useRef, useEffect, useCallback } from "react";
|
||||
import { Plus } from "lucide-react";
|
||||
import { motion } from "framer-motion";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import { staggerContainer } from "@/lib/motion";
|
||||
import {
|
||||
DndContext,
|
||||
@@ -387,12 +387,14 @@ export function BoardView() {
|
||||
</SortableContext>
|
||||
|
||||
{/* Drag overlay - renders a styled copy of the dragged item */}
|
||||
<DragOverlay>
|
||||
{activeCard ? (
|
||||
<CardOverlay card={activeCard} boardLabels={board.labels} />
|
||||
) : activeColumn ? (
|
||||
<ColumnOverlay column={activeColumn} />
|
||||
) : null}
|
||||
<DragOverlay dropAnimation={null}>
|
||||
<AnimatePresence>
|
||||
{activeCard ? (
|
||||
<CardOverlay key="card-overlay" card={activeCard} boardLabels={board.labels} />
|
||||
) : activeColumn ? (
|
||||
<ColumnOverlay key="column-overlay" column={activeColumn} />
|
||||
) : null}
|
||||
</AnimatePresence>
|
||||
</DragOverlay>
|
||||
</DndContext>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user