Skip to content

Commit 6fff0fb

Browse files
authored
Fix the drop target moving too fast when picking up a drag and drop item (#1762)
1 parent a078057 commit 6fff0fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

webview/src/plots/components/comparisonTable/DropTarget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export const DropTarget: React.FC = () => (
77
<Icon
88
icon={AllIcons.ELLIPSIS}
99
className={styles.smallDropIcon}
10-
width={20}
11-
height={20}
10+
width={15}
11+
height={15}
1212
/>
1313
</div>
1414
)

webview/src/shared/components/dragDrop/DragDropContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ export const DragDropContainer: React.FC<DragDropContainerProps> = ({
8383
}) => {
8484
const [draggedOverId, setDraggedOverId] = useState('')
8585
const [draggedId, setDraggedId] = useState('')
86-
const [direction, setDirection] = useState(DragEnterDirection.RIGHT)
86+
const [direction, setDirection] = useState(DragEnterDirection.LEFT)
8787
const { draggedRef, setDraggedRef } =
8888
useContext<DragDropContextValue>(DragDropContext)
8989
const draggedOverIdTimeout = useRef<number>(0)
9090

9191
const cleanup = () => {
9292
setDraggedOverId('')
9393
setDraggedId('')
94-
setDirection(DragEnterDirection.RIGHT)
94+
setDirection(DragEnterDirection.LEFT)
9595
}
9696

9797
useEffect(() => {

0 commit comments

Comments
 (0)