Skip to content

Commit

Permalink
StepItem: fully implement drop target
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunanoordin committed Nov 24, 2023
1 parent cca2ba3 commit 357a497
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ function DropTarget({

function onDrop(e) {
const from = parseInt(e.dataTransfer.getData('text/plain')) || 0;
const to = targetIndex;
console.log('+++ onDrop: ', from, to);
// moveStep(from, to);
const to = (from < targetIndex) ? targetIndex - 1 : targetIndex;
moveStep(from, to);
setActive(false);
e.preventDefault();
}
Expand Down

0 comments on commit 357a497

Please sign in to comment.