mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
Merge pull request #1672 from logto-io/charles-log-3795-connector-cannot-be-dragged-upwards
fix(console): connector can be dragged upwards to reorder
This commit is contained in:
commit
0302723994
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ const DraggableItem = ({ id, children, sortIndex, moveItem }: Props) => {
|
||||||
const clientOffset = monitor.getClientOffset();
|
const clientOffset = monitor.getClientOffset();
|
||||||
|
|
||||||
// Get pixels to the top
|
// Get pixels to the top
|
||||||
const hoverClientY = clientOffset?.y ?? 0 - hoverBoundingRect.top;
|
const hoverClientY = (clientOffset?.y ?? 0) - hoverBoundingRect.top;
|
||||||
|
|
||||||
// Only perform the move when the mouse has crossed half of the items height
|
// Only perform the move when the mouse has crossed half of the items height
|
||||||
// When dragging downwards, only move when the cursor is below 50%
|
// When dragging downwards, only move when the cursor is below 50%
|
||||||
|
|
Loading…
Reference in a new issue