working on drag and drop using dndkit

This commit is contained in:
paul
2025-03-01 19:20:46 +05:30
parent ed333d6ee6
commit 6656d3f6c4
18 changed files with 591 additions and 69 deletions

View File

@@ -1118,7 +1118,8 @@ class Widget extends React.Component {
// FIXME: if the parent container has tw-overflow-none, then the resizable indicator are also hidden
return (
<DragContext.Consumer>
// <DragContext.Consumer>
<>
{
({ draggedElement, widgetClass, onDragStart, onDragEnd, overElement, setOverElement }) => {
@@ -1258,7 +1259,7 @@ class Widget extends React.Component {
}
}
</DragContext.Consumer>
</>
)
}

View File

@@ -33,7 +33,7 @@ const WidgetDraggable = memo(({ widgetRef, enableDrag=true, dragElementType="wid
onDragStart(widgetRef?.current || null)
console.log("Drag start: ", widgetRef.current)
// console.log("Drag start: ", widgetRef.current)
// Create custom drag image with full opacity, this will ensure the image isn't taken from part of the canvas
const dragImage = widgetRef?.current.cloneNode(true)