Closed kurumbus closed 4 years ago
Yes, the idea is to use the method "on rearrange" to prevent the block from being deleted and instead go back to the previous position. Here's how you can do that:
function onRearrange(block, parent){
// When a block is rearranged
return true;
}
flowy(document.getElementById("canvas"), onGrab, onRelease, onSnap, onRearrange, spacing_x, spacing_y);
Hello! Thank you for a wonderful library.
So the issue for is that if you snap a block on some empty space it gets deleted. For us, the ideal would be to either rearrange it (as it currently is), but if someone snaps on an empty space - just return to the initial position. To be honest i kind of understand that it has something to do with
release()
orsnapping()
callbacks but don't know what exactly lolI've read a couple of similar issues, but I can't understand what I should do. :-/
48 #32 perhaps #57