fixed sidebar drop position using dnd-kit

This commit is contained in:
paul
2025-03-02 10:29:59 +05:30
parent a47191ee72
commit cc84a9f2d7
4 changed files with 58 additions and 23 deletions

View File

@@ -365,6 +365,7 @@ class Widget extends React.Component {
}
setPos(x, y) {
console.log("position set: ", x, y)
this.setState({
pos: { x, y }
@@ -1119,7 +1120,7 @@ class Widget extends React.Component {
return (
// <DragContext.Consumer>
<>
<DragContext.Consumer>
{
({ draggedElement, widgetClass, onDragStart, onDragEnd, overElement, setOverElement }) => {
@@ -1259,7 +1260,7 @@ class Widget extends React.Component {
}
}
</>
</DragContext.Consumer>
)
}