-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
I'm trying to use DragDrop.dragLayer :: DragLayerProps item -> JSX
so that I can render a drag ghost with opacity:0.2
. Every way I try it, I get the exception:
TypeError: connect.dragLayer is not a function
thrown from here:
And in fact there is no dragLayer
function in connect
:
* connect: DragDropMonitor
* store: {dispatch: ƒ, subscribe: ƒ, getState: ƒ, replaceReducer: ƒ, Symbol(observable): ƒ}
* registry: HandlerRegistry {store: {…}, types: {…}, handlers: {…}, pinnedSourceId: null, pinnedSource: null}
* __proto__:
* constructor: ƒ DragDropMonitor(store)
* subscribeToStateChange: ƒ subscribeToStateChange(listener)
* subscribeToOffsetChange: ƒ subscribeToOffsetChange(listener)
* canDragSource: ƒ canDragSource(sourceId)
* canDropOnTarget: ƒ canDropOnTarget(targetId)
* isDragging: ƒ isDragging()
* isDraggingSource: ƒ isDraggingSource(sourceId)
* isOverTarget: ƒ isOverTarget(targetId)
* getItemType: ƒ getItemType()
* getItem: ƒ getItem()
* getSourceId: ƒ getSourceId()
* getTargetIds: ƒ getTargetIds()
* getDropResult: ƒ getDropResult()
* didDrop: ƒ didDrop()
* isSourcePublic: ƒ isSourcePublic()
* getInitialClientOffset: ƒ getInitialClientOffset()
* getInitialSourceClientOffset: ƒ getInitialSourceClientOffset()
* getClientOffset: ƒ getClientOffset()
* getSourceClientOffset: ƒ getSourceClientOffset()
* getDifferenceFromInitialOffset: ƒ getDifferenceFromInitialOffset()
* __proto__: Object
I'm depending on purescript-react-dnd-basic v6.1.4 with react-dnd v2.6.0.
It's not obvious to me how to use DragDrop.dragLayer
. Should it be a parent or child of DragDrop.dragSource
? Is this feature known to work in purescript-react-dnd-basic? Is there an example somewhere of how to use it?
Metadata
Metadata
Assignees
Labels
No labels