Closed anhtu-phan closed 4 years ago
So as I understand it, your issue is that the rearrange function doesn't get called when some blocks from the canvas are rearranged and then snapped back to a different parent? In that case, the snap function should do the job.
Thank you for your library I have reArranging function like below
flowy(document.getElementById("canvas"), drag, release, snapping, reArranging); function reArranging(block, parent) { // When a block is rearranged console.log("REARANGE BLOCK", block); console.log("REARANGE PARENT", parent); }
When I move block to another position (not associated with any existed blocks in canvas) -> two line in function above is executed. But when I move block with associating with existed blocks in canvas -> two lines in function is not executed.My problem is that I need to get block and its new parent when rearranging block.
Please help me to solve this. thank you