craft.js
craft.js copied to clipboard
Drop Component Positon
Hi, Is there any way to determine that we are dropping a component on which Element and get a callback or something into to be dropped component to get its id or type?
@prevwong Could you please help me here? Thanks
Maybe so late but, are you tried with the rules properties? I think is what you need https://craft.js.org/r/docs/concepts/user-components#specify-dragdrop-rules in the Node api you can see posible values for rules https://craft.js.org/r/docs/api/node
With #188 we added a callback that returns the dropped node. You could get the parent via that and with that have access to the node which the newly created node has been dropped into.