fix(05-04): remove transform from DraggableToken to prevent snap-back animation

This commit is contained in:
Chandler Copeland
2026-03-20 00:59:27 -06:00
parent f8897cce34
commit cbad0a1a34

View File

@@ -67,9 +67,9 @@ async function persistFields(docId: string, fields: SignatureFieldData[]) {
// Draggable token in the palette
function DraggableToken({ id }: { id: string }) {
const { attributes, listeners, setNodeRef, transform, isDragging } = useDraggable({ id });
const { attributes, listeners, setNodeRef, isDragging } = useDraggable({ id });
const style: React.CSSProperties = {
transform: CSS.Translate.toString(transform),
// No transform — DragOverlay handles the ghost. Applying transform here causes snap-back animation.
opacity: isDragging ? 0.4 : 1,
cursor: 'grab',
padding: '6px 12px',