fix assistant drag transform effect (#2052)

This commit is contained in:
pablodanswer 2024-08-05 14:53:38 -07:00 committed by GitHub
parent 0bde66a888
commit 5bfdecacad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -52,7 +52,9 @@ function DraggableAssistantListItem(props: any) {
} = useSortable({ id: props.assistant.id.toString() });
const style = {
transform: CSS.Transform.toString(transform),
transform: transform
? `translate3d(${transform.x}px, ${transform.y}px, 0)`
: undefined,
transition,
opacity: isDragging ? 0.9 : 1,
zIndex: isDragging ? 1000 : "auto",

View File

@ -94,7 +94,9 @@ export function DraggableAssistantCard(props: {
} = useSortable({ id: props.assistant.id.toString() });
const style = {
transform: CSS.Transform.toString(transform),
transform: transform
? `translate3d(${transform.x}px, ${transform.y}px, 0)`
: undefined,
transition,
opacity: isDragging ? 0.9 : 1,
};