fix(05-04): remove transform from DraggableToken to prevent snap-back animation
This commit is contained in:
@@ -67,9 +67,9 @@ async function persistFields(docId: string, fields: SignatureFieldData[]) {
|
|||||||
|
|
||||||
// Draggable token in the palette
|
// Draggable token in the palette
|
||||||
function DraggableToken({ id }: { id: string }) {
|
function DraggableToken({ id }: { id: string }) {
|
||||||
const { attributes, listeners, setNodeRef, transform, isDragging } = useDraggable({ id });
|
const { attributes, listeners, setNodeRef, isDragging } = useDraggable({ id });
|
||||||
const style: React.CSSProperties = {
|
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,
|
opacity: isDragging ? 0.4 : 1,
|
||||||
cursor: 'grab',
|
cursor: 'grab',
|
||||||
padding: '6px 12px',
|
padding: '6px 12px',
|
||||||
|
|||||||
Reference in New Issue
Block a user